From 72c1e19c33ca06008d5d64619a533bdf34e3fc2b Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Sat, 25 Sep 2010 18:30:56 -0400 Subject: after_create in ActiveModel should in the order specified MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [#5650 state:resolved] Signed-off-by: José Valim --- 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 d811c3b2f0..0c1d46c7ec 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -482,7 +482,7 @@ module ActiveSupport chain.delete_if {|c| c.matches?(type, filter) } end - options[:prepend] ? chain.unshift(*mapped) : chain.push(*mapped) + options[:prepend] ? chain.unshift(*(mapped.reverse)) : chain.push(*mapped) end end -- cgit v1.2.3