Mystified by forms and models

Sean Colquhoun wrote:

Great. Thanks, Mark. That stops it from breaking.

But I'm left with the bigger problem now. Writing it as <%= check_box :todoitem, :done %> means that every check box comes out in HTML the same. Like this:

<input id="todoitem_done" name="todoitem[done]" type="checkbox" value="1" /><input name="todoitem[done]" type="hidden" value="0" />

Each one of these checkboxes has to be unique so that the function I'm going to write for them to change them into checked checkboxes knows which record to modify, right? Like this one that I found in a tutorial on the web:

If the todoitems already exist in the database, you can have their ids sent in a normal form post by using

    <%= check_box 'todoitem', :done %>

The project_id should either be a part of the form url, or set in a form hidden field.