lib/synchronisable/model/methods.rb in synchronisable-1.1.1 vs lib/synchronisable/model/methods.rb in synchronisable-1.1.2
- old
+ new
@@ -39,9 +39,19 @@
#
# @example Football domain use case
# Match.sync(:includes => {
# :match_players => :player
# })
+ #
+ # @example Here is all possible ways to call #sync:
+ # Model.sync
+ # Model.sync({ :a1 => 1, :a2 => 2 })
+ # Model.sync({ :includes => {...}, :parent => xxx })
+ # Model.sync(123)
+ # Model.sync('asdf')
+ # Model.sync([{ :a1 => 1, :a2 => 2 }, { :a1 => 3, :a2 => 4 }, ...])
+ # Model.sync([123, 345, 456])
+ # Model.sync(['123', '345', '456'])
def sync(*args)
Controller.call(self, *args)
end
# Count of import records for this model.