I'm making a simple to-do list application to teach myself Ruby on Rails, however I've run into a problem. I have a simple form that lists to-do items with a check box to the left of them, and an "Update" button at the bottom, as so:
[ ] Do the dishes
[ ] Take out the garbage
[ ] Take over the world
( Update )
Each to-do item is a separate record in the database with a "completed" boolean field. I want the form to submit a list of checked-off item ids to an action in which I can set each item's "completed" field to true, which will hide them from the view.
I know how to make a form that references multiple models, but not one that references multiple records of the same model. Any tips?
Thanks!