aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/associations/association.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/association.rb b/activerecord/lib/active_record/associations/association.rb
index 0ccf74c7a4..c3aee90124 100644
--- a/activerecord/lib/active_record/associations/association.rb
+++ b/activerecord/lib/active_record/associations/association.rb
@@ -177,9 +177,7 @@ module ActiveRecord
# Sets the owner attributes on the given record
def set_owner_attributes(record)
- if owner.persisted?
- creation_attributes.each { |key, value| record[key] = value }
- end
+ creation_attributes.each { |key, value| record[key] = value }
end
# Should be true if there is a foreign key present on the owner which