I’m developing a dutch ruby on rails application. So I want the error
messages to be in dutch. But when I add: ":message => ‘Geen wachtwoord
ingevuld’ " to the user model I get this error message:
" Password Geen wachtwoord ingevuld"
How can I remove the fieldname from the error message? So it would
say:
I’m developing a dutch ruby on rails application. So I want the error
messages to be in dutch. But when I add: ":message => ‘Geen wachtwoord
ingevuld’ " to the user model I get this error message:
" Password Geen wachtwoord ingevuld"
How can I remove the fieldname from the error message? So it would
say:
I’m developing a dutch ruby on rails application. So I want the error
messages to be in dutch. But when I add: ":message => ‘Geen wachtwoord
ingevuld’ " to the user model I get this error message:
" Password Geen wachtwoord ingevuld"
How can I remove the fieldname from the error message? So it would
say:
“Geen wachtwoord ingevuld”
Another solution for languages thing=>
You can change the return error message by editing the
default_error_messages array hash.
Example:
ActiveRecord::Errors.default_error_messages[:taken] = “is in use”
you put this line in your environment.rb file, and the error message
will be used across all your models validation uniqueness
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.