Class: Frigate::Form::Synchronizer::Basic::ModelSynchronizer

Inherits:
Fundamental
  • Object
show all
Defined in:
lib/frigate/form/synchronizer/basic.rb

Overview

A class for synchronization model with params

Instance Attribute Summary

Attributes inherited from Fundamental

#form

Instance Method Summary collapse

Methods inherited from Fundamental

#initialize

Constructor Details

This class inherits a constructor from Frigate::Form::Synchronizer::Fundamental

Instance Method Details

#sync_with_model(opts = {}) ⇒ Object

Synchronizes given model with form properties and associations:properties

Parameters:

  • ops (Hash)


11
12
13
14
15
# File 'lib/frigate/form/synchronizer/basic.rb', line 11

def sync_with_model(opts={})
	sync_properties
	sync_associations
	save_model if opts[:save]
end