Module: Synchronisable::Model::Methods
- Defined in:
- lib/synchronisable/model/methods.rb
Overview
Methods that will be attached to synchronisable model class.
Instance Method Summary collapse
-
#imports_count ⇒ Object
Count of import records for this model.
-
#sync(*args) ⇒ Object
Creates a new controller, that initiates synchronization for this particular model and its associations.
Instance Method Details
#imports_count ⇒ Object
Count of import records for this model.
59 60 61 |
# File 'lib/synchronisable/model/methods.rb', line 59 def imports_count Import.where(synchronisable_type: self).count end |
#sync(data, options) ⇒ Object #sync(options) ⇒ Object #sync(data) ⇒ Object #sync ⇒ Object
Creates a new controller, that initiates synchronization for this particular model and its associations. If you have implemented ‘fetch` & `find` methods in your model synchronizer, than it will be used if no data supplied.
54 55 56 |
# File 'lib/synchronisable/model/methods.rb', line 54 def sync(*args) Controller.call(self, *args) end |