Module | ActiveRecord::Timestamp |
In: |
lib/active_record/timestamp.rb
|
Active Record automatically timestamps create and update if the table has fields created_at/created_on or updated_at/updated_on.
Timestamping can be turned off by setting
<tt>ActiveRecord::Base.record_timestamps = false</tt>
Keep in mind that, via inheritance, you can turn off timestamps on a per model basis by setting record_timestamps to false in the desired models.
class Feed < ActiveRecord::Base self.record_timestamps = false # ... end
Timestamps are in the local timezone by default but can use UTC by setting
<tt>ActiveRecord::Base.default_timezone = :utc</tt>