diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-15 09:30:08 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-15 09:30:08 -0700 |
commit | 99f5add4be302a6b17f7098c1a9233a19de0fda4 (patch) | |
tree | caaeadce56555240b25617e7dc1547eb4da1e2af /activesupport/lib | |
parent | d10cadca0cda894ce4536a3b9d9367bc6f5d9b0e (diff) | |
download | rails-99f5add4be302a6b17f7098c1a9233a19de0fda4.tar.gz rails-99f5add4be302a6b17f7098c1a9233a19de0fda4.tar.bz2 rails-99f5add4be302a6b17f7098c1a9233a19de0fda4.zip |
conditions are guaranteed to be arrays by initialize
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 6f89b16d36..d4c18793ca 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -463,8 +463,8 @@ module ActiveSupport end def conditions_lambdas - Array(options[:if]).map { |c| make_lambda c } + - Array(options[:unless]).map { |c| invert_lambda make_lambda c } + options[:if].map { |c| make_lambda c } + + options[:unless].map { |c| invert_lambda make_lambda c } end def _normalize_legacy_filter(kind, filter) |