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

after_commit with on: option doesn't work at Rails 5.1.3 #418

Open
abinoam opened this issue Aug 29, 2017 · 1 comment
Open

after_commit with on: option doesn't work at Rails 5.1.3 #418

abinoam opened this issue Aug 29, 2017 · 1 comment

Comments

@abinoam
Copy link

abinoam commented Aug 29, 2017

At Rails 5.0.5 the code bellow used to work.

  acts_as_paranoid
  after_commit :callback_method_name, on: [ :create, :update, :destroy ]

Now at Rails 5.1.3 it only works without the on: option.

  acts_as_paranoid
  after_commit :callback_method_name

If we remove acts_as_paranoid the on: option works with Rails 5.1.3 as expected.
I have assembled a self contained test on a gist.

https://gist.github.com/abinoam/d7029f02052b8a05407d4d4c5b1403f3

I have tried to dig a little on the issue, but I'm afraid I'm not up to it!

@williamweckl
Copy link

This is still happending on Rails 5.1.7. There is any workaround to make it work?

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

2 participants