Permalink
Browse files

attribute_names will always return a list, so just use any?

  • Loading branch information...
1 parent df3b650 commit 4729208f6a89b4d98b9a1049175297775a9e0f33 @tenderlove tenderlove committed Nov 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_controller/metal/params_wrapper.rb
View
2 actionpack/lib/action_controller/metal/params_wrapper.rb
@@ -180,7 +180,7 @@ def _default_wrap_model #:nodoc:
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

0 comments on commit 4729208

Please sign in to comment.