diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 466f6baea86e6862f6145d0c3661a228386c6c9c..92a4635011c52d793bb8c21c51482b83667bcd5a 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -565,6 +565,11 @@ def reset_callbacks(symbol) # passed. In the above case method "before_save" is constructed by calling "#{kind}_#{name}" # in the given class. In this case "kind" is "before" and "name" is "save". # + # Although ":kind" is the default scope that is passed, it is possible to not to make use of ":kind". + # define_callbacks :save, :scope => [:name] . A declaration like this would call "save" method of + # Audit class since ":kind" is skipped. + # + # def define_callbacks(*callbacks) config = callbacks.last.is_a?(Hash) ? callbacks.pop : {} callbacks.each do |callback|