I've just added a couple of fields to one of our models (Resource):
active (boolean) and activated_at (datetime).
I want to set it up so that if i make a restful call to update, and set
active to true, ie
then activated_at is automatically set to Time.now.
I can't quite work out how to set this up though...it's almost like a
before_save, where i check if active was JUST SET to true, or we just
got a request to make it true, as opposed to simply testing if it's
I'm sure this is slap-my-head obvious - anyone?