Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TableSync doesn't work if hook was used in model #75

Open
eugeneyak opened this issue Feb 15, 2023 · 0 comments
Open

TableSync doesn't work if hook was used in model #75

eugeneyak opened this issue Feb 15, 2023 · 0 comments

Comments

@eugeneyak
Copy link
Member

eugeneyak commented Feb 15, 2023

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 eugeneyak changed the title TableSync doesn't work if hook was user in model TableSync doesn't work if hook was used in model Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant