提交 434c768a 编写于 作者: G Gaurav Sharam

‘test_after_commit’ gem is not required in Rails 5 remove note from doc

上级 221e847a
......@@ -227,8 +227,6 @@ def before_commit(*args, &block) # :nodoc:
# after_commit :do_foo_bar, on: [:create, :update]
# after_commit :do_bar_baz, on: [:update, :destroy]
#
# Note that transactional fixtures do not play well with this feature. Please
# use the +test_after_commit+ gem to have these hooks fired in tests.
def after_commit(*args, &block)
set_options_for_callbacks!(args)
set_callback(:commit, :after, *args, &block)
......@@ -456,13 +454,13 @@ def has_transactional_callbacks? # :nodoc:
end
# Updates the attributes on this particular ActiveRecord object so that
# if it is associated with a transaction, then the state of the AR object
# will be updated to reflect the current state of the transaction
# if it's associated with a transaction, then the state of the ActiveRecord
# object will be updated to reflect the current state of the transaction
#
# The @transaction_state variable stores the states of the associated
# transaction. This relies on the fact that a transaction can only be in
# one rollback or commit (otherwise a list of states would be required)
# Each AR object inside of a transaction carries that transaction's
# Each ActiveRecord object inside of a transaction carries that transaction's
# TransactionState.
#
# This method checks to see if the ActiveRecord object's state reflects
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册