Where can I change the "Email has already been received" error message?

I need to configure a message error: Email has already been taken for email, I work with Ruby 1.9.2, Rails 3.1.3, Devise 1.5.3, I tried to change the message in: config/locales/devise.en.yml and to my config/locales/en.yml but that doesn't work!

In my models/user , I have:

 validates_uniqueness_of :email, :message => "este mail ya sido utilizado" 

It shows this message, but it also shows: Email has already been taken .

+3
source share
1 answer

I have never used Devise, but I think the β€œtaken” message is an ActiveRecord error message (not related to the Devise stone). If you plan to use non-English, I would advise you to change the default locale instead of adding non-English content to the EN.

 sp: activerecord: errors: messages: taken: "este %{model} ya sido utilizado" 
+13
source

Source: https://habr.com/ru/post/949123/


All Articles