I have a very sime app.
I need to create as many records in the db as the selected
checkboxes (named :isselected) in the view.
Here is the code snippet from the controller:
isselectedhash = params[:isselected]
for mod in isselectedhash.keys
@issue = Issue.new(params[:issue])
@issue.state = 'NEW'
@issue.mod_id = isselectedhash[mod] # this gets the mod_id
When I have two boxes selected this loop goes thru twice, but only
one record is created in the DB.
Here is the log,. Note, no SQL for the second object that needs to
be saved. Why is that?