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! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Florian Gilcher 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) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---