Sha256: d0649632e216a083b81745e0fc98918bf1d314a3da0b66c666ac6cc5efff1eb4

Contents?: true

Size: 1.18 KB

Versions: 8

Compression:

Stored size: 1.18 KB

Contents

# encoding: utf-8
module Dynamoid

  # All modules that a Document is composed of are defined in this
  # module, to keep the document class from getting too cluttered.
  module Components
    extend ActiveSupport::Concern

    included do
      extend ActiveModel::Translation
      extend ActiveModel::Callbacks

      define_model_callbacks :create, :save, :destroy, :initialize, :update

      before_create :set_created_at
      before_save :set_updated_at
      after_initialize :set_type
    end

    include ActiveModel::AttributeMethods
    include ActiveModel::Conversion
    include ActiveModel::MassAssignmentSecurity if defined?(ActiveModel::MassAssignmentSecurity)
    include ActiveModel::Naming
    include ActiveModel::Observing if defined?(ActiveModel::Observing)
    include ActiveModel::Serializers::JSON
    include ActiveModel::Serializers::Xml if defined?(ActiveModel::Serializers::Xml)
    include Dynamoid::Fields
    include Dynamoid::Indexes
    include Dynamoid::Persistence
    include Dynamoid::Finders
    include Dynamoid::Associations
    include Dynamoid::Criteria
    include Dynamoid::Validations
    include Dynamoid::IdentityMap
    include Dynamoid::Dirty
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dynamoid-2.2.0 lib/dynamoid/components.rb
dynamoid-2.1.0 lib/dynamoid/components.rb
dynamoid-2.0.0 lib/dynamoid/components.rb
dynamoid-1.3.4 lib/dynamoid/components.rb
dynamoid-1.3.3 lib/dynamoid/components.rb
dynamoid-1.3.2 lib/dynamoid/components.rb
dynamoid-1.3.1 lib/dynamoid/components.rb
dynamoid-1.3.0 lib/dynamoid/components.rb