Sha256: caeb9be093c0fe80eca20fdeff8a5b5c164da43f34b23c1149ac151c8eb41aa2

Contents?: true

Size: 432 Bytes

Versions: 27

Compression:

Stored size: 432 Bytes

Contents

# frozen_string_literal: true

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

27 entries across 27 versions & 1 rubygems

Version Path
mongoid-8.1.9 lib/mongoid/timestamps/updated/short.rb
mongoid-8.0.9 lib/mongoid/timestamps/updated/short.rb
mongoid-8.1.8 lib/mongoid/timestamps/updated/short.rb
mongoid-8.1.7 lib/mongoid/timestamps/updated/short.rb
mongoid-8.1.6 lib/mongoid/timestamps/updated/short.rb
mongoid-8.0.8 lib/mongoid/timestamps/updated/short.rb
mongoid-8.1.5 lib/mongoid/timestamps/updated/short.rb
mongoid-8.1.4 lib/mongoid/timestamps/updated/short.rb
mongoid-8.0.7 lib/mongoid/timestamps/updated/short.rb
mongoid-8.1.3 lib/mongoid/timestamps/updated/short.rb
mongoid-8.1.2 lib/mongoid/timestamps/updated/short.rb
mongoid-8.0.6 lib/mongoid/timestamps/updated/short.rb
mongoid-7.5.4 lib/mongoid/timestamps/updated/short.rb
mongoid-8.1.1 lib/mongoid/timestamps/updated/short.rb
mongoid-8.0.5 lib/mongoid/timestamps/updated/short.rb
mongoid-8.1.0 lib/mongoid/timestamps/updated/short.rb
mongoid-7.5.3 lib/mongoid/timestamps/updated/short.rb
mongoid-8.0.4 lib/mongoid/timestamps/updated/short.rb
mongoid-8.0.3 lib/mongoid/timestamps/updated/short.rb
mongoid-7.5.2 lib/mongoid/timestamps/updated/short.rb