aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorkennyj <kennyj@gmail.com>2012-01-22 03:23:40 +0900
committerkennyj <kennyj@gmail.com>2012-01-24 17:36:30 +0900
commit5e59d755361e50e3f8c54d80f2a769b84f52dcc7 (patch)
tree5c472784fb86e793548db8c9c52961d8da207e7c /activesupport/lib
parentdea2523232a0b2f9e7ba0b1d271aff4584a4e2a3 (diff)
downloadrails-5e59d755361e50e3f8c54d80f2a769b84f52dcc7.tar.gz
rails-5e59d755361e50e3f8c54d80f2a769b84f52dcc7.tar.bz2
rails-5e59d755361e50e3f8c54d80f2a769b84f52dcc7.zip
Fix GH #4344. A defined callback in extended module is called too.
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/callbacks.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb
index 9cea09db41..5eaeac2cb3 100644
--- a/activesupport/lib/active_support/callbacks.rb
+++ b/activesupport/lib/active_support/callbacks.rb
@@ -359,7 +359,7 @@ module ActiveSupport
def __run_callbacks(key, kind, object, &blk) #:nodoc:
name = __callback_runner_name(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}