I'm trying to do something pretty trivial here and I haven't had any
luck searching the groups and tutorials.

My model has a boolean field called 'completed', and a datetime field
called 'completed_at'

When the 'update' method in the controller is called, I'd like it to..

if the user has set 'completed' == true, set completed_at = Date.today
If the user has set 'completed' == false, set completed_at = nil

Would some nice person please explain to me how this would be done?
Do I put this in the controller or the model?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to