From 5e59d755361e50e3f8c54d80f2a769b84f52dcc7 Mon Sep 17 00:00:00 2001 From: kennyj Date: Sun, 22 Jan 2012 03:23:40 +0900 Subject: Fix GH #4344. A defined callback in extended module is called too. --- activesupport/lib/active_support/callbacks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib') 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} -- cgit v1.2.3