about summary refs log tree commit diff
path: root/app/controllers/api
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-03 13:59:31 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-03 13:59:31 +0100
commit562044f36ad8ebe388e32eef2e5d44bec4a9af59 (patch)
tree1e699f23aa961a63ed2911789c4d31a33e2e8aae /app/controllers/api
parent0160d1d9b5195e5d8fcb94b29f74634b129439b4 (diff)
Need to disable caching again due to bug in Rabl
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/v1/statuses_controller.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb
index b02b7bb57..3db4dbbd0 100644
--- a/app/controllers/api/v1/statuses_controller.rb
+++ b/app/controllers/api/v1/statuses_controller.rb
@@ -9,10 +9,9 @@ class Api::V1::StatusesController < ApiController
   end
 
   def context
-    @status      = Status.find(params[:id])
-    @ancestors   = @status.ancestors
-    @descendants = @status.descendants
-    set_maps([@status] + @ancestors + @descendants)
+    @status  = Status.find(params[:id])
+    @context = OpenStruct.new({ ancestors: @status.ancestors, descendants: @status.descendants })
+    set_maps([@status] + @context[:ancestors] + @context[:descendants])
   end
 
   def create