mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
expand on set_callback method to explain that in
some cases an implicit :before is assumed
This commit is contained in:
parent
68ebd332d0
commit
3c1a0a8b62
1 changed files with 4 additions and 0 deletions
|
@ -447,6 +447,10 @@ module ActiveSupport
|
|||
# set_callback :save, :after, :after_meth, :if => :condition
|
||||
# set_callback :save, :around, lambda { |r| stuff; yield; stuff }
|
||||
#
|
||||
# If the second argument is not :before, :after or :around then an implicit :before is assumed.
|
||||
# It means the first example mentioned above can also be written as:
|
||||
# set_callback :save, :before_meth
|
||||
#
|
||||
# Use skip_callback to skip any defined one.
|
||||
#
|
||||
# When creating or skipping callbacks, you can specify conditions that
|
||||
|
|
Loading…
Reference in a new issue