Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use self.target= rather than @target= as the former automatically set…

…s loaded
  • Loading branch information...
commit 115eedbb410c52364e3353266316c218a29e5998 1 parent ef79b91
@jonleighton jonleighton authored tenderlove committed
View
4 activerecord/lib/active_record/associations/belongs_to_association.rb
@@ -10,11 +10,9 @@ def replace(record)
replace_keys(record)
set_inverse_instance(record)
- @target = record
@updated = true if record
- loaded
- record
+ self.target = record
end
def updated?
View
3  activerecord/lib/active_record/associations/has_one_association.rb
@@ -24,8 +24,7 @@ def replace(record, save = true)
end
end
- @target = record
- loaded
+ self.target = record
end
private
Please sign in to comment.
Something went wrong with that request. Please try again.