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:
@@ -171,7 +171,7 @@ describe SessionController do
|
||||
|
||||
context 'when email is confirmed' do
|
||||
before do
|
||||
token = user.email_tokens.where(email: user.email).first
|
||||
token = user.email_tokens.find_by(email: user.email)
|
||||
EmailToken.confirm(token.token)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user