From 562044f36ad8ebe388e32eef2e5d44bec4a9af59 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 3 Nov 2016 13:59:31 +0100 Subject: Need to disable caching again due to bug in Rabl --- app/controllers/api/v1/statuses_controller.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app/controllers/api') 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 -- cgit