Hello people,
I was wondering how to make the errors that an active record model
throws during form validation apear in dutch. the message is easily
adaptable, but the subject of the error still shows up in english.
thanks!
Hello people,
I was wondering how to make the errors that an active record model
throws during form validation apear in dutch. the message is easily
adaptable, but the subject of the error still shows up in english.
thanks!
danny wrote:
Hello people,
I was wondering how to make the errors that an active record model
throws during form validation apear in dutch. the message is easily
adaptable, but the subject of the error still shows up in english.thanks!
Quick fix: don’t use the default errors_for - helper but implement your
own. It’s done in 2 seconds and is a no-brainer. I usually handle this
as a partial instead.
@model.error holds the error collection (attribute as key, errors as
value) - iterate over it and display them.
IMHO errors_for outside is for scaffolding uses only if you use another
language then english.
Florian G. wrote:
danny wrote:
Hello people,
I was wondering how to make the errors that an active record model
throws during form validation apear in dutch. the message is easily
adaptable, but the subject of the error still shows up in english.thanks!
Quick fix: don’t use the default errors_for - helper but implement your
own. It’s done in 2 seconds and is a no-brainer. I usually handle this
as a partial instead.@model.error holds the error collection (attribute as key, errors as
value) - iterate over it and display them.IMHO errors_for outside is for scaffolding uses only if you use another
language then english.
thanks for the quick response, I have created the partial now (found out
that it had to be @model.errors)
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs