Updating records from a hash

add this in ur loop:

@todoitem.done = value @todoitem.save

You forgot to save the value that you are changing.

One thing but, you might want to wrap that in a transaction, if one of your loops fails, you'll end up in a strange database state.

Cam