Good notes posted by GreggPollackRSS feed
If you call save, and no attributes are “dirty” (changed), then an update query will not happen against the database, and thus updated_at and updated_on will not be set.
You’ll need to modify at least one field to get updated_at and updated_on to set themselves.
As it says here at the bottom if you do in-place modifications using << you’ll need to call the will_change method!
This also goes for bang methods. So:
person = Person.first person.name.downcase! person.save
will not save anything! Save will never be called. To get the name saved you need to do
person = Person.first person.name_will_change! person.name.downcase! person.save
This will save the name.