table_sync icon indicating copy to clipboard operation
table_sync copied to clipboard

TableSync doesn't work if hook was used in model

Open eugeneyak opened this issue 2 years ago • 0 comments

TableSync defines hooks directly in model without including or prepending code and if you define similar hooks, tablesync's hooks are shadowed and don't work

class Test < Sequel::Model
  TableSync.sync(self)

  def after_create
    super
    p "AFTER CREATE"
  end
end

Test.create

You will see "AFTER CREATE" in console but data won't be synced

eugeneyak avatar Feb 15 '23 11:02 eugeneyak