> In the model:
>
> validates_inclusion_of :whatever, :in => [true, false], :message =>
> 
I18n.t('activerecord.errors.models.my_model.attributes.whatever.please_select_whatever')
>
>
> In config/locales/en.yml:
>
> en:
>   activerecord:
>     errors:
>       models:
>         my_model:
>           attributes:
>             whatever:
>               please_select_whatever: "Please select whatever."



Nope, this doesn't work. I suspect it's still the same problem: it seems 
not possible to have translations in models (since they only get loaded 
once).

It may work for the default "keys" (for "validates_presence_of :name" 
the key would be "blank"), but not the custom ones.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to