diff options
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 4ee8cf2457..027b5becf1 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -341,10 +341,7 @@ module ActiveSupport reverse_each do |callback| callbacks = callback.apply(callbacks) end - - lambda { |target, &block| - callbacks.call(target, false, nil, &block)[2] - } + callbacks end def append(*callbacks) @@ -384,7 +381,7 @@ module ActiveSupport str = object.send("_#{kind}_callbacks").compile class_eval do define_method(name) do |&block| - str.call self, &block + str.call(self, false, nil, &block)[2] end protected name end |