diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-11-13 13:40:29 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-11-13 16:35:15 -0800 |
commit | 4729208f6a89b4d98b9a1049175297775a9e0f33 (patch) | |
tree | 74f84e12611da751edaf333139cd8293dce593c7 /actionpack/lib/action_controller/metal | |
parent | df3b65081012f7e24fb44320d4febd9008dbb20c (diff) | |
download | rails-4729208f6a89b4d98b9a1049175297775a9e0f33.tar.gz rails-4729208f6a89b4d98b9a1049175297775a9e0f33.tar.bz2 rails-4729208f6a89b4d98b9a1049175297775a9e0f33.zip |
attribute_names will always return a list, so just use any?
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r-- | actionpack/lib/action_controller/metal/params_wrapper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/params_wrapper.rb b/actionpack/lib/action_controller/metal/params_wrapper.rb index 0234f138e8..42519488bd 100644 --- a/actionpack/lib/action_controller/metal/params_wrapper.rb +++ b/actionpack/lib/action_controller/metal/params_wrapper.rb @@ -180,7 +180,7 @@ module ActionController def _set_wrapper_defaults(opts, model=nil) unless opts.include || opts.exclude model ||= _default_wrap_model - if model.respond_to?(:attribute_names) && model.attribute_names.present? + if model.respond_to?(:attribute_names) && model.attribute_names.any? opts.include = model.attribute_names end end |