Permalink
Browse files

Fix grammar

  • Loading branch information...
1 parent d4b8052 commit ec950cf2baf68c5bd0d59b591a9f47ee86c308e4 @joliss joliss committed Aug 29, 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 ec950cf

Please sign in to comment.