diff options
author | kennyj <kennyj@gmail.com> | 2012-01-22 03:23:40 +0900 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-01-24 09:55:23 +0100 |
commit | dc826f9977650c105e9bfd308d6d4fc71bb6ec6e (patch) | |
tree | d78d65724bc61a9f6f4f053fd275aea9b8a815b9 /activesupport/lib | |
parent | 1a56a761530e3adf043a9d45ca6e1e90114f6a0e (diff) | |
download | rails-dc826f9977650c105e9bfd308d6d4fc71bb6ec6e.tar.gz rails-dc826f9977650c105e9bfd308d6d4fc71bb6ec6e.tar.bz2 rails-dc826f9977650c105e9bfd308d6d4fc71bb6ec6e.zip |
Fix GH #4344. A defined callback in extended module is called too.
Conflicts:
activesupport/test/callbacks_test.rb
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 0495741c15..f5fd86bf74 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -396,7 +396,7 @@ module ActiveSupport def __run_callback(key, kind, object, &blk) #:nodoc: name = __callback_runner_name(key, kind) unless object.respond_to?(name) - str = send("_#{kind}_callbacks").compile(key, object) + str = object.send("_#{kind}_callbacks").compile(key, object) class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 def #{name}() #{str} end protected :#{name} |