about summary refs log tree commit diff
path: root/app/controllers/api/statuses_controller.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-09-18 12:28:49 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-09-18 12:28:49 +0200
commitadffc7a49527d816f95e34268ebf196d9f020579 (patch)
tree1ed7992d34ed855168bfe8e3dd69290b25d8d520 /app/controllers/api/statuses_controller.rb
parentbf4ee145f907f311c686c69ac28f006c8a4735af (diff)
Fix #43
Diffstat (limited to 'app/controllers/api/statuses_controller.rb')
-rw-r--r--app/controllers/api/statuses_controller.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/api/statuses_controller.rb b/app/controllers/api/statuses_controller.rb
index 90e78a542..a4b183ef1 100644
--- a/app/controllers/api/statuses_controller.rb
+++ b/app/controllers/api/statuses_controller.rb
@@ -8,8 +8,8 @@ class Api::StatusesController < ApiController
 
   def context
     @status      = Status.find(params[:id])
-    @ancestors   = @status.ancestors.with_includes.with_counters
-    @descendants = @status.descendants.with_includes.with_counters
+    @ancestors   = @status.ancestors.with_includes.with_counters.to_a
+    @descendants = @status.descendants.with_includes.with_counters.to_a
   end
 
   def create
@@ -28,10 +28,10 @@ class Api::StatusesController < ApiController
   end
 
   def home
-    @statuses = Feed.new(:home, current_user.account).get(20, params[:max_id])
+    @statuses = Feed.new(:home, current_user.account).get(20, params[:max_id]).to_a
   end
 
   def mentions
-    @statuses = Feed.new(:mentions, current_user.account).get(20, params[:max_id])
+    @statuses = Feed.new(:mentions, current_user.account).get(20, params[:max_id]).to_a
   end
 end