From a3e9d6bb22774c3f7ec22c3f8bfeabf56ed8436d Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 10 May 2013 11:06:27 -0700 Subject: __define_callbacks method is not necessary anymore --- activesupport/lib/active_support/callbacks.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 4b5c1ed538..715e4cf8a1 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -76,7 +76,7 @@ module ActiveSupport # save # end def run_callbacks(kind, &block) - runner = self.class.__define_callbacks(kind, self) + runner = send("_#{kind}_callbacks").compile e = Filters::Environment.new(self, false, nil, block) runner.call(e).value end @@ -427,13 +427,6 @@ module ActiveSupport module ClassMethods - # This method defines callback chain method for the given kind - # if it was not yet defined. - # This generated method plays caching role. - def __define_callbacks(kind, object) #:nodoc: - object.send("_#{kind}_callbacks").compile - end - def __reset_runner(symbol) name = __callback_runner_name(symbol) undef_method(name) if method_defined?(name) -- cgit v1.2.3