How do I set a datetime field to "now"

In my controller I have a model called Todo. It has a column called
date_completed that is null by default, and when the todo is “done” this
date is filled out. How do I set the date to “now” on the model?

I tried this:

@todo.date_completed = DateTime.now

but that didn’t work.

On Nov 21, 2007, at 12:33 AM, Luke Visinoni wrote:

I tried this:

@todo.date_completed = DateTime.now

but that didn’t work.

Time.now will work.