diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-10 11:06:27 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-10 11:06:27 -0700 |
commit | a3e9d6bb22774c3f7ec22c3f8bfeabf56ed8436d (patch) | |
tree | 562a3ae44327e521b9cb3c67de5bc7df7737f079 | |
parent | d1316bb128b1905995ba9f3e4ff35a628b845780 (diff) | |
download | rails-a3e9d6bb22774c3f7ec22c3f8bfeabf56ed8436d.tar.gz rails-a3e9d6bb22774c3f7ec22c3f8bfeabf56ed8436d.tar.bz2 rails-a3e9d6bb22774c3f7ec22c3f8bfeabf56ed8436d.zip |
__define_callbacks method is not necessary anymore
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 9 |
1 files changed, 1 insertions, 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) |