lib/table_sync/config.rb in table_sync-1.12.1 vs lib/table_sync/config.rb in table_sync-1.13.0

- old
+ new

@@ -17,10 +17,11 @@ default_values({}) @rest_key = :rest @version_key = :version @first_sync_time_key = nil @on_destroy = nil + @wrap_receiving = nil target_keys(model.primary_keys) end # add_option implements the following logic # config.option - get value @@ -67,9 +68,13 @@ callback_registry.register_callback(block, kind: :after_commit, event: on.to_sym) end def on_destroy(&block) block_given? ? @on_destroy = block : @on_destroy + end + + def wrap_receiving(&block) + block_given? ? @wrap_receiving = block : @wrap_receiving end check_and_set_column_key = proc do |key| key = key.to_sym raise "#{model.inspect} doesn't have key: #{key}" unless model.columns.include?(key)