Skip to content

Commit 852912c

Browse files
Merge pull request #206 from lda/ability_to_localize_error_message
Ability to localize error message
2 parents dae8106 + 7a6fea6 commit 852912c

File tree

1 file changed

+1
-1
lines changed
  • app/models/devise_token_auth/concerns

1 file changed

+1
-1
lines changed

app/models/devise_token_auth/concerns/user.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def generate_url(url, params = {})
225225
# only validate unique email among users that registered by email
226226
def unique_email_user
227227
if provider == 'email' and self.class.where(provider: 'email', email: email).count > 0
228-
errors.add(:email, "This email address is already in use")
228+
errors.add(:email, :already_in_use, default: "This email address is already in use")
229229
end
230230
end
231231

0 commit comments

Comments
 (0)