cjm2671
cjm2671

Reputation: 19476

How do I override 'Email has already been taken'?

I would like to replace this error message with something more instructive, to help the user understand what to do next. Unfortunately I can't seem to find this anywhere in my source; where is it coming from and how can I amend it?

Upvotes: 5

Views: 1492

Answers (1)

Benoit Garret
Benoit Garret

Reputation: 13675

Look in config/locales/YOUR_LOCALE.yml and set the following key:

errors:
  messages:
    taken: "has already been taken"

You can find translated files for multiple languages here: https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale

Upvotes: 5

Related Questions