diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-11-13 10:36:06 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-11-13 16:35:15 -0800 |
commit | 9a64ffc0c77c2b614401fad665ae2edb33c754a7 (patch) | |
tree | 5364352ce616033e6a842b5ae55c4765040979db | |
parent | 3c5c93b2ebb9be715df2a34f150020dc7af73b15 (diff) | |
download | rails-9a64ffc0c77c2b614401fad665ae2edb33c754a7.tar.gz rails-9a64ffc0c77c2b614401fad665ae2edb33c754a7.tar.bz2 rails-9a64ffc0c77c2b614401fad665ae2edb33c754a7.zip |
replace present? with any? to reduce dependency on AS
-rw-r--r-- | actionpack/lib/action_controller/base.rb | 1 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/params_wrapper.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 9b3bf99fc3..971c4189c8 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -1,4 +1,5 @@ require "action_controller/log_subscriber" +require "action_controller/metal/params_wrapper" module ActionController # Action Controllers are the core of a web request in \Rails. They are made up of one or more actions that are executed diff --git a/actionpack/lib/action_controller/metal/params_wrapper.rb b/actionpack/lib/action_controller/metal/params_wrapper.rb index 09abc999c1..dedb80e408 100644 --- a/actionpack/lib/action_controller/metal/params_wrapper.rb +++ b/actionpack/lib/action_controller/metal/params_wrapper.rb @@ -126,7 +126,7 @@ module ActionController # wrapper key and attribute names. Will be called automatically when the # module is inherited. def inherited(klass) - if klass._wrapper_options[:format].present? + if klass._wrapper_options[:format].any? klass._set_wrapper_defaults(klass._wrapper_options.slice(:format)) end super |