From 1c61f7e6cb2882907fa85fabbf147937f5cc07bf Mon Sep 17 00:00:00 2001 From: Bogdan Gusiev Date: Fri, 3 Feb 2012 14:27:15 +0200 Subject: AC::Callbacks: remove usage of :per_key option from filters --- activesupport/lib/active_support/callbacks.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 5eaeac2cb3..bc6bd55a45 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -136,8 +136,8 @@ module ActiveSupport end def _update_filter(filter_options, new_options) - filter_options[:if].push(new_options[:unless]) if new_options.key?(:unless) - filter_options[:unless].push(new_options[:if]) if new_options.key?(:if) + filter_options[:if].concat(Array(new_options[:unless])) if new_options.key?(:unless) + filter_options[:unless].concat(Array(new_options[:if])) if new_options.key?(:if) end def recompile!(_options, _per_key) -- cgit v1.2.3