[Rails] inserting multiple rows
mizage
estettler at mail.com
Wed Dec 14 15:19:59 GMT 2005
I have table which stores multiple entries. Each row has user_id,
game_id and a pick_id. On a page the user has to make load of choices.
All this gets submitted.
the html looks like so:
<input type="hidden" name="game_id" value="3">
<input type="hidden" name="user_id" value="19">
<select name="pick[3]">
....
</select>
<input type="hidden" name="game_id" value="4">
<input type="hidden" name="user_id" value="19">
<select name="pick[4]">
...
</select>
on and on...
how do i get the controller to take all the form elements and do a
multiple insert into the db?
--
Posted via http://www.ruby-forum.com/.
More information about the Rails
mailing list