diff options
Diffstat (limited to 'app/controllers/api/v1')
-rw-r--r-- | app/controllers/api/v1/statuses_controller.rb | 7 |
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 |