fix weird indentation

This commit is contained in:
Régis Hanol 2017-08-04 17:28:25 +02:00
parent c76161787c
commit ecbeaed0bc
1 changed files with 5 additions and 6 deletions

View File

@ -341,13 +341,12 @@ class TopicView
end end
end end
# Returns an array of [id, post_number, days_ago] tuples. `days_ago` is there for the timeline # Returns an array of [id, post_number, days_ago] tuples.
# calculations. # `days_ago` is there for the timeline calculations.
def filtered_post_stream def filtered_post_stream
@filtered_post_stream ||= @filtered_posts.order(:sort_order) @filtered_post_stream ||= @filtered_posts
.pluck(:id, .order(:sort_order)
:post_number, .pluck(:id, :post_number, 'EXTRACT(DAYS FROM CURRENT_TIMESTAMP - created_at)::INT AS days_ago')
'EXTRACT(DAYS FROM CURRENT_TIMESTAMP - created_at)::INT AS days_ago')
end end
def filtered_post_ids def filtered_post_ids