Don't check for user sign in when fetching subscriptions in timeline
This commit is contained in:
parent
904eab8daa
commit
d77919ee01
|
@ -35,7 +35,7 @@ class TimelineController < ApplicationController
|
|||
timeline_ids = @timeline.map(&:id)
|
||||
@timeline_last_id = timeline_ids.min
|
||||
@more_data_available = !yield(last_id: @timeline_last_id, size: 1).count.zero?
|
||||
subscribed_answer_ids = Subscription.where(user: current_user, answer_id: timeline_ids).pluck(:answer_id) if user_signed_in?
|
||||
subscribed_answer_ids = Subscription.where(user: current_user, answer_id: timeline_ids).pluck(:answer_id)
|
||||
|
||||
respond_to do |format|
|
||||
format.html { render "timeline/timeline", locals: { subscribed_answer_ids: } }
|
||||
|
|
Loading…
Reference in New Issue