Here's what you need to do for ActiveRecord to use modtime as its update column:
Create a file in the config/initializers directory named active_record_patch.rb
# config/initializers/active_record_patch.rb
module ActiveRecord
module Timestamp
private
def timestamp_attributes_for_update #:nodoc:
[:modtime, :updated_on, :modified_at]
end
end
end
What you are doing here is overriding ActiveRecord::Timestamp's timestamp_attributes_for_update
method which it uses to identify the names of its update attributes. The file needs to be put in config/initializers since all files in initializers get run once your Rails app loads.
This is a monkey patch and overrides the normal behavior of ActiveRecord::Timestamp which may break when you use a different version of ActiveRecord.
Hope it helps.