module ActiveSupport::Callbacks::ClassMethods
def reset_callbacks(symbol)
Remove all set callbacks for the given event.
def reset_callbacks(symbol) callbacks = send("_#{symbol}_callbacks") ActiveSupport::DescendantsTracker.descendants(self).each do |target| chain = target.send("_#{symbol}_callbacks").dup callbacks.each { |c| chain.delete(c) } target.send("_#{symbol}_callbacks=", chain) target.__reset_runner(symbol) end self.send("_#{symbol}_callbacks=", callbacks.dup.clear) __reset_runner(symbol) end