problem with polymorphic nested attributes

hi, i i have a model (Page) and i want to put their multilanguage text with a polimorphic association model (Lang), because i want to use in future this model for containing others modules text (example: Category, Notice, ecc..).

now i make this code on models:

Aldo Italo wrote:

hi, i i have a model (Page) and i want to put their multilanguage text with a polimorphic association model (Lang), because i want to use in future this model for containing others modules text (example: Category, Notice, ecc..).

Um, why bother to do this? Rails has its own i18n infrastructure -- just use that.

Best,

Um, why bother to do this? Rails has its own i18n infrastructure -- just use that.

i use i18n for static texts in /locales, how can use i18n infrastructure for DB contents?

thanks

I think your fields_for line is wrong. It should match the association
name 'langs':

<% f.fields_for :langs do |l| %>

Regards

Andrés Cirugeda Esco wrote:

I think your fields_for line is wrong. It should match the association name 'langs':

<% f.fields_for :langs do |l| %>

Regards -- Andr�s Cirugeda Esco

i have previous tryed with your solution, but the view page not display the :langs inputs ( display only if i use :lang ).