Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 4729208f6a89b4d98b9a1049175297775a9e0f33 1 parent df3b650
@tenderlove tenderlove authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.