From d77919ee01b6e188764c52cd0f0f50adb710c58f Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sun, 19 Feb 2023 15:50:32 +0100 Subject: [PATCH] Don't check for user sign in when fetching subscriptions in timeline --- app/controllers/timeline_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/timeline_controller.rb b/app/controllers/timeline_controller.rb index 75c54e78..d905ccd5 100644 --- a/app/controllers/timeline_controller.rb +++ b/app/controllers/timeline_controller.rb @@ -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: } }