From ec950cf2baf68c5bd0d59b591a9f47ee86c308e4 Mon Sep 17 00:00:00 2001 From: Jo Liss Date: Thu, 30 Aug 2012 01:03:51 +0200 Subject: Fix grammar --- activerecord/lib/active_record/associations/has_one_association.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/associations/has_one_association.rb b/activerecord/lib/active_record/associations/has_one_association.rb index dd7da59a86..06bead41de 100644 --- a/activerecord/lib/active_record/associations/has_one_association.rb +++ b/activerecord/lib/active_record/associations/has_one_association.rb @@ -30,11 +30,11 @@ module ActiveRecord if (target || record) && target != record reflection.klass.transaction do remove_target!(options[:dependent]) if target && !target.destroyed? - + if record set_owner_attributes(record) set_inverse_instance(record) - + if owner.persisted? && save && !record.save nullify_owner_attributes(record) set_owner_attributes(target) if target @@ -82,7 +82,7 @@ module ActiveRecord if target.persisted? && owner.persisted? && !target.save set_owner_attributes(target) raise RecordNotSaved, "Failed to remove the existing associated #{reflection.name}. " + - "The record failed to save when after its foreign key was set to nil." + "The record failed to save after its foreign key was set to nil." end end end -- cgit v1.2.3