aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/has_one_association.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/associations/has_one_association.rb')
-rw-r--r--activerecord/lib/active_record/associations/has_one_association.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/has_one_association.rb b/activerecord/lib/active_record/associations/has_one_association.rb
index 9beddb2ac9..bb541152c1 100644
--- a/activerecord/lib/active_record/associations/has_one_association.rb
+++ b/activerecord/lib/active_record/associations/has_one_association.rb
@@ -7,7 +7,7 @@ module ActiveRecord
end
def create(attrs = {}, replace_existing = true)
- record = @reflection.klass.with_scope(construct_scope) { @reflection.klass.create(attrs) }
+ record = @reflection.klass.with_scope(:create => construct_scope[:create]) { @reflection.klass.create(attrs) }
if replace_existing
replace(record, true)
@@ -20,7 +20,7 @@ module ActiveRecord
end
def create!(attrs = {}, replace_existing = true)
- record = @reflection.klass.with_scope(construct_scope) { @reflection.klass.create!(attrs) }
+ record = @reflection.klass.with_scope(:create => construct_scope[:create]) { @reflection.klass.create!(attrs) }
if replace_existing
replace(record, true)