about summary refs log tree commit diff
path: root/app/views/stream_entries
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-09-24 14:34:44 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-09-24 14:34:44 +0200
commitfb9401379699a06508a8f3ca84433d1b20bc4975 (patch)
tree3ffb53d859109ae20446848f6ecc7cbab52a3901 /app/views/stream_entries
parent3b56350121998abb249f14a45c656c2655d6344e (diff)
Improved partial rendering for threads
Diffstat (limited to 'app/views/stream_entries')
-rw-r--r--app/views/stream_entries/_status.html.haml6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/views/stream_entries/_status.html.haml b/app/views/stream_entries/_status.html.haml
index a0afccd39..6254d75e9 100644
--- a/app/views/stream_entries/_status.html.haml
+++ b/app/views/stream_entries/_status.html.haml
@@ -4,8 +4,7 @@
 - centered          = include_threads && !is_predecessor && !is_successor
 
 - if status.reply? && include_threads
-  - @ancestors.each do |status|
-    = render partial: 'status', locals: { status: status, is_predecessor: true }
+  = render partial: 'status', collection: @ancestors, as: :status, locals: { is_predecessor: true }
 
 .entry{ class: entry_classes(status, is_predecessor, is_successor, include_threads) }
   - if status.reblog?
@@ -43,5 +42,4 @@
           %li.transparent-background= link_to '', media.file.url, style: "background-image: url(#{media.file.url(:small)})", target: '_blank'
 
 - if include_threads
-  - @descendants.each do |status|
-    = render partial: 'status', locals: { status: status, is_successor: true }
+  = render partial: 'status', collection: @descendants, as: :status, locals: { is_successor: true }