1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix the API documentation layout of after_*_commit

Just noticed this on the [edge API].

[ci skip]

[edge API]: http://edgeapi.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html
This commit is contained in:
Genadi Samokovarov 2016-01-20 18:21:46 +02:00
parent 4b507dff1e
commit 933e11f831

View file

@ -233,19 +233,19 @@ module ActiveRecord
set_callback(:commit, :after, *args, &block)
end
# Shortcut for +after_commit :hook, on: :create+.
# Shortcut for <tt>after_commit :hook, on: :create</tt>.
def after_create_commit(*args, &block)
set_options_for_callbacks!(args, on: :create)
set_callback(:commit, :after, *args, &block)
end
# Shortcut for +after_commit :hook, on: :update+.
# Shortcut for <tt>after_commit :hook, on: :update</tt>.
def after_update_commit(*args, &block)
set_options_for_callbacks!(args, on: :update)
set_callback(:commit, :after, *args, &block)
end
# Shortcut for +after_commit :hook, on: :destroy+.
# Shortcut for <tt>after_commit :hook, on: :destroy</tt>.
def after_destroy_commit(*args, &block)
set_options_for_callbacks!(args, on: :destroy)
set_callback(:commit, :after, *args, &block)