aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/has_one_through_association.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/associations/has_one_through_association.rb')
-rw-r--r--activerecord/lib/active_record/associations/has_one_through_association.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/has_one_through_association.rb b/activerecord/lib/active_record/associations/has_one_through_association.rb
index 69771afe50..112b773ec4 100644
--- a/activerecord/lib/active_record/associations/has_one_through_association.rb
+++ b/activerecord/lib/active_record/associations/has_one_through_association.rb
@@ -1,7 +1,7 @@
module ActiveRecord
# = Active Record Has One Through Association
module Associations
- class HasOneThroughAssociation < HasOneAssociation
+ class HasOneThroughAssociation < HasOneAssociation #:nodoc:
include ThroughAssociation
def replace(record)
@@ -12,7 +12,7 @@ module ActiveRecord
private
def create_through_record(record)
- through_proxy = @owner.send(:association_proxy, @reflection.through_reflection.name)
+ through_proxy = @owner.association(@reflection.through_reflection.name)
through_record = through_proxy.send(:load_target)
if through_record && !record