diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-08-17 18:20:12 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-08-17 18:22:29 +0100 |
commit | 5ecb02f6dd60a742d93d306b70be09d6ffb29081 (patch) | |
tree | b80105972d2a65828b6d18f683f4e88c88ec347e /activerecord | |
parent | 49cb4ed845e730f69fb2a26a594976039d3d2559 (diff) | |
download | rails-5ecb02f6dd60a742d93d306b70be09d6ffb29081.tar.gz rails-5ecb02f6dd60a742d93d306b70be09d6ffb29081.tar.bz2 rails-5ecb02f6dd60a742d93d306b70be09d6ffb29081.zip |
don't call method unless we need to
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/attribute_assignment.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_assignment.rb b/activerecord/lib/active_record/attribute_assignment.rb index 6f6fc13d16..a54c103476 100644 --- a/activerecord/lib/active_record/attribute_assignment.rb +++ b/activerecord/lib/active_record/attribute_assignment.rb @@ -106,7 +106,7 @@ module ActiveRecord # 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 |