提交 5ecb02f6 编写于 作者: J Jon Leighton

don't call method unless we need to

上级 49cb4ed8
...@@ -106,7 +106,7 @@ def assign_attributes(new_attributes, options = {}) ...@@ -106,7 +106,7 @@ def assign_attributes(new_attributes, options = {})
# assign any deferred nested attributes after the base attributes have been set # assign any deferred nested attributes after the base attributes have been set
nested_parameter_attributes.each { |k,v| _assign_attribute(k, v) } nested_parameter_attributes.each { |k,v| _assign_attribute(k, v) }
assign_multiparameter_attributes(multi_parameter_attributes) assign_multiparameter_attributes(multi_parameter_attributes) unless multi_parameter_attributes.empty?
ensure ensure
@mass_assignment_options = previous_options @mass_assignment_options = previous_options
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册