mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08: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:
@ -19,7 +19,7 @@ class Auth::GithubAuthenticator < Auth::Authenticator
|
||||
github_screen_name: screen_name,
|
||||
}
|
||||
|
||||
user_info = GithubUserInfo.where(github_user_id: github_user_id).first
|
||||
user_info = GithubUserInfo.find_by(github_user_id: github_user_id)
|
||||
|
||||
if user_info
|
||||
user = user_info.user
|
||||
|
Reference in New Issue
Block a user