__update_callbacks(name, filters = [], block = nil)
public
This is used internally to append, prepend and skip callbacks to the CallbackChain.
# File activesupport/lib/active_support/callbacks.rb, line 397
def __update_callbacks(name, filters = [], block = nil) #:nodoc:
type = CALLBACK_FILTER_TYPES.include?(filters.first) ? filters.shift : :before
options = filters.last.is_a?(Hash) ? filters.pop : {}
filters.unshift(block) if block
([self] + ActiveSupport::DescendantsTracker.descendants(self)).reverse.each do |target|
chain = target.send("_#{name}_callbacks")
yield target, chain.dup, type, filters, options
target.__reset_runner(name)
end
end