未验证 提交 7b51b140 编写于 作者: R Ryan Perez 提交者: Rafael Mendonça França

Fixed functionality to include method in params_wrapper.rb

to properly wrap all attributes, including those which are nested.
上级 08df10a9
......@@ -113,6 +113,13 @@ def include
self.include = m.attribute_names
end
end
if m.respond_to?(:nested_attributes_options) && m.nested_attributes_options.any?
nested_attributes_names = self.nested_attributes_options.keys.map do |key|
key.to_s.concat('_attributes').to_sym
end
self.include += nested_attributes_names
end
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册