Hi there,
I have the following validation in a model:
validates_inclusion_of :whatever, :in => [true, false], :message =>
I18n.t('please_select_whatever')
It seems that the translation does not work in production mode: in all
languages it's always the english translation that gets diplayed
(probably because I set english as the default locale in my app...?).
So I am assuming that we can't translate validations in models, because
models get loaded only once - when the server is booted (and then, the
default locale would be applied).
Am I right? If yes, how would you solve this problem?
Thanks for your help!
Tom
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment