Module: MR::JsonField::FakeRecord::InstanceMethods

Defined in:
lib/mr/json_field/fake_record.rb

Instance Method Summary collapse

Instance Method Details

#save!Object

this mimics the ‘JsonField::Record` mixin, doing the same logic to ensure that the source fields match the json fields



20
21
22
23
24
25
# File 'lib/mr/json_field/fake_record.rb', line 20

def save!
  self.model.class.json_field_accessors.each do |field_name|
    self.model.send("#{field_name}=", self.model.send(field_name))
  end
  super
end