Skip to content

Commit

Permalink
Rm profile N+1
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolai-b committed Dec 11, 2024
1 parent ab925bf commit 0b731c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/message_threads_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def show
last_viewed = current_user.viewed_thread_at(thread)
ThreadRecorder.thread_viewed thread, current_user
else
@subscribers = thread.subscribers.is_public
@subscribers = thread.subscribers.is_public.includes(:profile)
end
messages = messages.after_date_with_n_before(after_date: last_viewed, n_before: 10) if last_viewed

Expand Down

0 comments on commit 0b731c1

Please sign in to comment.