aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-05-10 11:06:27 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-05-10 11:06:27 -0700
commita3e9d6bb22774c3f7ec22c3f8bfeabf56ed8436d (patch)
tree562a3ae44327e521b9cb3c67de5bc7df7737f079 /activesupport/lib
parentd1316bb128b1905995ba9f3e4ff35a628b845780 (diff)
downloadrails-a3e9d6bb22774c3f7ec22c3f8bfeabf56ed8436d.tar.gz
rails-a3e9d6bb22774c3f7ec22c3f8bfeabf56ed8436d.tar.bz2
rails-a3e9d6bb22774c3f7ec22c3f8bfeabf56ed8436d.zip
__define_callbacks method is not necessary anymore
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/callbacks.rb9
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)