Have you tried using a <%= text_field(“movie[]”, “name”) %> tag?
(Notice the square brackets after the object name). The resulting
html, when submitted, maps to a params object that contains a hash of
hashes. You can then use the following code to do an update:
Have you tried using a <%= text_field(“movie[]”, “name”) %> tag?
(Notice the square brackets after the object name). The resulting
html, when submitted, maps to a params object that contains a hash of
hashes. You can then use the following code to do an update:
If you own the AWDWR book, it’s documented in a sidebar called “Forms
Containing Collections” in chapter 17.
Hope it helps,
-Anthony
Thanks guys, the first solution worked. The second would work if I were
updating (I saw it in the book as well) but since I’m creating new
records, I wasn’t sure how to do it.
Thanks again,
Dan
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.