diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-21 23:18:28 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-21 23:18:28 +0200 |
commit | c0e9603c921b66b927f9380968c70ac89253f30c (patch) | |
tree | 995e7f89759c550d91abd4af9eabf162943fa6aa /app/controllers/stream_entries_controller.rb | |
parent | d709151781ae67290456a1fe7c1bd1346254cd8c (diff) |
Fix #50 - Order ancestors/descendants by tree path
Diffstat (limited to 'app/controllers/stream_entries_controller.rb')
-rw-r--r-- | app/controllers/stream_entries_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/stream_entries_controller.rb b/app/controllers/stream_entries_controller.rb index e25e7f5ed..0d6b9ea8e 100644 --- a/app/controllers/stream_entries_controller.rb +++ b/app/controllers/stream_entries_controller.rb @@ -9,8 +9,8 @@ class StreamEntriesController < ApplicationController @type = @stream_entry.activity_type.downcase if @stream_entry.activity_type == 'Status' - @ancestors = @stream_entry.activity.ancestors.with_includes.with_counters - @descendants = @stream_entry.activity.descendants.with_includes.with_counters + @ancestors = @stream_entry.activity.ancestors + @descendants = @stream_entry.activity.descendants if user_signed_in? status_ids = [@stream_entry.activity_id] + @ancestors.map { |s| s.id } + @descendants.map { |s| s.id } |