How to create multiple rows in a model in a form

Hi.

How do I create multiple rows in one model in a form? I have done the
tutorial, multiple models in one form by ryan. This might be easy for
most programmers. But I just don’t understand how to multiple rows in
one model in a form.

Can someone please help me?

Thanks

You need to use the :index option when creating your fields (eg. with
text_field).

Stephen Chu has written a great post on this:
http://www.stephenchu.com/2008/03/paramsfu-3-using-fieldsfor-and-index.html

Hope that helps

  • Barney

On May 5, 7:13 pm, user splash [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs