Skip to content
New issue

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

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

Already on GitHub? # to your account

Is it possible to trigger callback for after_commit rather than after_create or after_save #848

Open
egemen-dev opened this issue Sep 4, 2024 · 1 comment

Comments

@egemen-dev
Copy link

egemen-dev commented Sep 4, 2024

This might be a suggestion for a future request.

Example from docs:

books.each do |book|
  book.run_callbacks(:save) { false }
  book.run_callbacks(:create) { false }
end

I'd love to have an option for commit as well.

book.run_callbacks(:commit)

I was wondering why we only got 2 options for callbacks, save and create?

Thanks in advance.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@egemen-dev and others