mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Perform the where(...).first to find_by(...) refactoring.
This refactoring was automated using the command: bundle exec "ruby refactorings/where_dot_first_to_find_by/app.rb"
This commit is contained in:
@@ -185,7 +185,7 @@ class TopicView
|
||||
def topic_user
|
||||
@topic_user ||= begin
|
||||
return nil if @user.blank?
|
||||
@topic.topic_users.where(user_id: @user.id).first
|
||||
@topic.topic_users.find_by(user_id: @user.id)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user