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

Introduce after_{create,update,delete}_commit callbacks #22516

Merged
merged 1 commit into from Dec 6, 2015

Conversation

gsamokovarov
Copy link
Contributor

@gsamokovarov gsamokovarov commented Dec 6, 2015

Those are actually shortcuts for after_commit.

Before:

after_commit :add_to_index_later, on: :create
after_commit :update_in_index_later, on: :update
after_commit :remove_from_index_later, on: :destroy

After:

after_create_commit  :add_to_index_later
after_update_commit  :update_in_index_later
after_destroy_commit :remove_from_index_later

Fixes #22515.

@rails-bot
Copy link

rails-bot commented Dec 6, 2015

r? @senny

(@rails-bot has picked a reviewer for you, use r? to override)

@gsamokovarov gsamokovarov force-pushed the after-create-update-destroy-commit branch 2 times, most recently from 2cbd5d2 to 76ed730 Compare Dec 6, 2015
Those are actually shortcuts for `after_commit`.

Before:

    after_commit :add_to_index_later, on: :create
    after_commit :update_in_index_later, on: :update
    after_commit :remove_from_index_later, on: :destroy

After:

    after_create_commit  :add_to_index_later
    after_update_commit  :update_in_index_later
    after_destroy_commit :remove_from_index_later
@gsamokovarov gsamokovarov force-pushed the after-create-update-destroy-commit branch from 76ed730 to 5a300b2 Compare Dec 6, 2015
@dhh
Copy link
Member

dhh commented Dec 6, 2015

Lovely! You're fast 👌

dhh added a commit that referenced this pull request Dec 6, 2015
…oy-commit

Introduce after_{create,update,delete}_commit callbacks
@dhh dhh merged commit a246a69 into rails:master Dec 6, 2015
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

Successfully merging this pull request may close these issues.

None yet

4 participants