aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2012-08-30 00:41:16 -0700
committerVijay Dev <vijaydev.cse@gmail.com>2012-08-30 00:41:16 -0700
commit8074f3b478a110236c8e12bc0678660a9231126b (patch)
treef5edd68d13ebd12a1343ee1d26931e03a13de25d /activerecord
parentc584568ae289baa0eb6fa55ab6fe1cb01ccb41e7 (diff)
parentec950cf2baf68c5bd0d59b591a9f47ee86c308e4 (diff)
downloadrails-8074f3b478a110236c8e12bc0678660a9231126b.tar.gz
rails-8074f3b478a110236c8e12bc0678660a9231126b.tar.bz2
rails-8074f3b478a110236c8e12bc0678660a9231126b.zip
Merge pull request #7481 from joliss/typo
Fix grammar
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/associations/has_one_association.rb6
1 files changed, 3 insertions, 3 deletions
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