forked from Veraticus/Dynamoid
-
Notifications
You must be signed in to change notification settings - Fork 1
/
components.rb
36 lines (31 loc) · 1.01 KB
/
components.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# 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
before_create :set_created_at
before_save :set_updated_at
end
include ActiveModel::AttributeMethods
include ActiveModel::Conversion
include ActiveModel::MassAssignmentSecurity
include ActiveModel::Naming
include ActiveModel::Observing
include ActiveModel::Serializers::JSON
include 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