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-6.0.1 lib/mongoid/timestamps/updated/short.rb
mongoid-5.1.5 lib/mongoid/timestamps/updated/short.rb
mongoid-6.0.0 lib/mongoid/timestamps/updated/short.rb
mongoid-5.1.4 lib/mongoid/timestamps/updated/short.rb
mongoid-6.0.0.rc0 lib/mongoid/timestamps/updated/short.rb
mongoid-6.0.0.beta lib/mongoid/timestamps/updated/short.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mongoid-5.1.3/lib/mongoid/timestamps/updated/short.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mongoid-4.0.2/lib/mongoid/timestamps/updated/short.rb
mongoid-5.1.3 lib/mongoid/timestamps/updated/short.rb
mongoid-5.1.2 lib/mongoid/timestamps/updated/short.rb
mongoid-5.1.1 lib/mongoid/timestamps/updated/short.rb
mongoid-5.1.0 lib/mongoid/timestamps/updated/short.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.1/lib/mongoid/timestamps/updated/short.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/mongoid-5.0.2/lib/mongoid/timestamps/updated/short.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.2/lib/mongoid/timestamps/updated/short.rb
mongoid-5.0.2 lib/mongoid/timestamps/updated/short.rb
mongoid-5.0.1 lib/mongoid/timestamps/updated/short.rb
mongoid-5.0.0 lib/mongoid/timestamps/updated/short.rb
mongoid-5.0.0.rc0 lib/mongoid/timestamps/updated/short.rb
mongoid-5.0.0.beta lib/mongoid/timestamps/updated/short.rb