Module: Dynamoid::Dirty::ClassMethods

Defined in:
lib/dynamoid/dirty.rb

Instance Method Summary collapse

Instance Method Details

#from_databaseObject


41
42
43
44
45
# File 'lib/dynamoid/dirty.rb', line 41

def from_database(*)
  super.tap do |m|
    m.send(:clear_changes_information)
  end
end

#update_fieldsObject


27
28
29
30
31
32
# File 'lib/dynamoid/dirty.rb', line 27

def update_fields(*)
  if model = super
    model.send(:clear_changes_information)
  end
  model
end

#upsertObject


34
35
36
37
38
39
# File 'lib/dynamoid/dirty.rb', line 34

def upsert(*)
  if model = super
    model.send(:clear_changes_information)
  end
  model
end