I have a process which iterates through a bunch of ActiveRecord models, does some processing, and saves the models again. Often though, the processing doesn't result in an changes to the attributes and so the
updated_at column never changes (even though save is called).
- Add a separate timestamp column to the model (i.e., '
processed_at') and manage this myself, although this seems a bit wasteful/redundant.
- Or somehow override the management of the
touch method is already in Rails 2.3.x, so you can simply do:
To update the
updated_at column. Alternatively, to update some other column with the current date and time use: