[Rails3] Localization for non activerecord models

346 views
Skip to first unread message

Fernando Perez

unread,
Feb 7, 2011, 2:38:17 PM2/7/11
to rails...@googlegroups.com
I have a Contact model that is a non activerecord model. I can use the
validation thanks to Rails3, but I do not in which section of
en.yml/de.yml I should localize the attributes of my Contact model.

--
Posted via http://www.ruby-forum.com/.

Iain Hecker

unread,
Feb 8, 2011, 5:44:15 AM2/8/11
to rails...@googlegroups.com
The scope is not under activerecord, but activemodel, which you can
change: https://github.com/rails/rails/blob/master/activemodel/lib/active_model/translation.rb#L26-29

Hope this helps

Cheers, iain

> --
> You received this message because you are subscribed to the Google Groups "rails-i18n" group.
> To post to this group, send email to rails...@googlegroups.com.
> To unsubscribe from this group, send email to rails-i18n+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rails-i18n?hl=en.
>
>

Fernando Perez

unread,
Feb 9, 2011, 9:05:07 AM2/9/11
to rails...@googlegroups.com
Iain Hecker wrote in post #980254:

> The scope is not under activerecord, but activemodel, which you can
> change:
>
https://github.com/rails/rails/blob/master/activemodel/lib/active_model/translation.rb#L26-29
>
> Hope this helps
>
> Cheers, iain

Thank you!

Beate Paland

unread,
Feb 13, 2011, 11:03:18 AM2/13/11
to rails...@googlegroups.com
2011/2/9 Fernando Perez <li...@ruby-forum.com>:

Greek Store

unread,
Oct 14, 2014, 12:07:27 PM10/14/14
to rails...@googlegroups.com
[Alpha Gamma Delta Rose Silver]Oh so cool a frozen rose. Says my heart
like this. http://greek21.com/images/AGD-M007.jpg

[Alpha Omicron Pi Horizontal] Something like a sliver necklace make me a
new mood a day. http://greek21.com/images/AOP-P003.jpg
Reply all
Reply to author
Forward
0 new messages