Permalink
Browse files

Merge pull request #7481 from joliss/typo

Fix grammar
  • Loading branch information...
2 parents c584568 + ec950cf commit 8074f3b478a110236c8e12bc0678660a9231126b @vijaydev vijaydev committed Aug 30, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/lib/active_record/associations/has_one_association.rb
@@ -30,11 +30,11 @@ def replace(record, save = true)
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 @@ def remove_target!(method)
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

0 comments on commit 8074f3b

Please sign in to comment.