In my Rails 3 application, I want to write an entry only in a specific log, if the changes are really made in the model. Therefore, if the user does not change any of the fields and clicks Submit, then there should be no journal entry.
But it seems that no matter what Rails always seems to think that the DateTime attributes of the model have been changed.
When I debug, I run the following lines during my update, and both of them return true, which I think will be a contradiction.
@request.begin_date == @request.begin_date_was
I am wondering if this is due to a change in the default date format in the initializer (to "% m /% d /% Y") or, possibly, time zones.
I'm at a dead end, so any help would be greatly appreciated.
source share