提交 4729208f 编写于 作者: A Aaron Patterson

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

上级 df3b6508
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册