__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 445
def __update_callbacks(name, filters = [], block = nil) #:nodoc:
type = [:before, :after, :around].include?(filters.first) ? filters.shift : :before
options = filters.last.is_a?(Hash) ? filters.pop : {}
filters.unshift(block) if block
([self] + ActiveSupport::DescendantsTracker.descendants(self)).each do |target|
chain = target.send("_#{name}_callbacks")
yield chain, type, filters, options
target.__define_runner(name)
end
end