From 63c8ea9a6a28ecaabb236dae094d99d9d1ee2ecd Mon Sep 17 00:00:00 2001 From: Rolf Timmermans Date: Sat, 12 Mar 2011 14:24:36 +0100 Subject: adds a couple of missing AS dependencies --- activesupport/lib/active_support/callbacks.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activesupport/lib/active_support/callbacks.rb') diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index b531a094cf..a7a7836f03 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -1,3 +1,4 @@ +require 'active_support/concern' require 'active_support/descendants_tracker' require 'active_support/core_ext/array/wrap' require 'active_support/core_ext/class/attribute' -- cgit v1.2.3 From 1a3fe8ce42e202630e6b1d8cf7137002e270ebdb Mon Sep 17 00:00:00 2001 From: Rolf Timmermans Date: Sat, 12 Mar 2011 23:05:52 +0800 Subject: Prevent callbacks in child classes from being executed more than once. --- activesupport/lib/active_support/callbacks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/callbacks.rb') diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index a7a7836f03..418102352f 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -416,7 +416,7 @@ module ActiveSupport options = filters.last.is_a?(Hash) ? filters.pop : {} filters.unshift(block) if block - ([self] + ActiveSupport::DescendantsTracker.descendants(self)).each do |target| + ([self] + ActiveSupport::DescendantsTracker.descendants(self)).reverse.each do |target| chain = target.send("_#{name}_callbacks") yield target, chain.dup, type, filters, options target.__define_runner(name) -- cgit v1.2.3