123456789_123456789_123456789_123456789_123456789_

Module: Mongoid::Timestamps::Updated::Short

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ActiveSupport::Concern
Defined in: lib/mongoid/timestamps/updated/short.rb

Overview

Adds an updated_at timestamp to the document, but it is stored as u_at with an updated_at alias.

DSL Calls

included

[ GitHub ]


11
12
13
14
15
16
# File 'lib/mongoid/timestamps/updated/short.rb', line 11

included do
  include Updated

  fields.delete('updated_at')
  field :u_at, type: Time, as: :updated_at
end