Skip to content

Commit

Permalink
don't call method unless we need to
Browse files Browse the repository at this point in the history
  • Loading branch information
jonleighton committed Aug 17, 2012
1 parent 49cb4ed commit 5ecb02f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/attribute_assignment.rb
Expand Up @@ -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
Expand Down

0 comments on commit 5ecb02f

Please sign in to comment.