Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

don't call method unless we need to

  • Loading branch information...
commit 5ecb02f6dd60a742d93d306b70be09d6ffb29081 1 parent 49cb4ed
Jon Leighton jonleighton authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/attribute_assignment.rb
2  activerecord/lib/active_record/attribute_assignment.rb
View
@@ -106,7 +106,7 @@ def assign_attributes(new_attributes, options = {})
# assign any deferred nested attributes after the base attributes have been set
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
@mass_assignment_options = previous_options
end
Please sign in to comment.
Something went wrong with that request. Please try again.