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

Merge pull request #19595 from claudiob/fix-docs-set-callback

Fix doc: set_callback also accepts an array of if:
This commit is contained in:
Yves Senn 2015-03-31 09:45:59 +02:00
commit 347266280e

View file

@ -663,10 +663,12 @@ module ActiveSupport
#
# ===== Options
#
# * <tt>:if</tt> - A symbol naming an instance method or a proc; the
# callback will be called only when it returns a +true+ value.
# * <tt>:unless</tt> - A symbol naming an instance method or a proc; the
# callback will be called only when it returns a +false+ value.
# * <tt>:if</tt> - A symbol, a string or an array of symbols and strings,
# each naming an instance method or a proc; the callback will be called
# only when they all return a true value.
# * <tt>:unless</tt> - A symbol, a string or an array of symbols and
# strings, each naming an instance method or a proc; the callback will
# be called only when they all return a false value.
# * <tt>:prepend</tt> - If +true+, the callback will be prepended to the
# existing chain rather than appended.
def set_callback(name, *filter_list, &block)