aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorBogdan Gusiev <agresso@gmail.com>2012-02-03 14:27:15 +0200
committerBogdan Gusiev <agresso@gmail.com>2012-02-03 14:27:15 +0200
commit1c61f7e6cb2882907fa85fabbf147937f5cc07bf (patch)
tree3ff67f48ea7c10627614509b1c97d2c8dfc49d73 /activesupport/lib
parent2abaa19e77d1097730cfa6e0924ee7c1660ac01f (diff)
downloadrails-1c61f7e6cb2882907fa85fabbf147937f5cc07bf.tar.gz
rails-1c61f7e6cb2882907fa85fabbf147937f5cc07bf.tar.bz2
rails-1c61f7e6cb2882907fa85fabbf147937f5cc07bf.zip
AC::Callbacks: remove usage of :per_key option from filters
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/callbacks.rb4
1 files changed, 2 insertions, 2 deletions
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)