Sha256: 3a67debe77ec8203f4c4ebbec011e615feae8eb435b55b135b87ae65b903ab47

Contents?: true

Size: 419 Bytes

Versions: 73

Compression:

Stored size: 419 Bytes

Contents

# encoding: utf-8
module Mongoid
  module Timestamps
    module Updated

      # Adds an updated_at timestamp to the document, but it is stored as u_at
      # with an updated_at alias.
      module Short
        extend ActiveSupport::Concern

        included do
          include Updated
          fields.delete("updated_at")
          field :u_at, type: Time, as: :updated_at
        end
      end
    end
  end
end

Version data entries

73 entries across 68 versions & 6 rubygems

Version Path
mongoid-7.0.13 lib/mongoid/timestamps/updated/short.rb
mongoid-7.0.12 lib/mongoid/timestamps/updated/short.rb
mongoid-6.4.8 lib/mongoid/timestamps/updated/short.rb
mongoid-7.0.11 lib/mongoid/timestamps/updated/short.rb
mongoid-7.0.10 lib/mongoid/timestamps/updated/short.rb
mongoid-6.4.7 lib/mongoid/timestamps/updated/short.rb
mongoid-6.4.5 lib/mongoid/timestamps/updated/short.rb
mongoid-7.0.8 lib/mongoid/timestamps/updated/short.rb
mongoid-7.0.7 lib/mongoid/timestamps/updated/short.rb
mongoid-7.0.6 lib/mongoid/timestamps/updated/short.rb
mongoid-5.4.1 lib/mongoid/timestamps/updated/short.rb
mongoid-7.0.5 lib/mongoid/timestamps/updated/short.rb
mongoid-7.0.4 lib/mongoid/timestamps/updated/short.rb
mongoid-6.4.4 lib/mongoid/timestamps/updated/short.rb
mongoid-7.0.3 lib/mongoid/timestamps/updated/short.rb
mongoid-6.4.2 lib/mongoid/timestamps/updated/short.rb
mongoid-7.0.2 lib/mongoid/timestamps/updated/short.rb
mongoid-7.0.1 lib/mongoid/timestamps/updated/short.rb
mongoid-6.4.1 lib/mongoid/timestamps/updated/short.rb
mongoid-5.4.0 lib/mongoid/timestamps/updated/short.rb