From 6356d42093b10866f18d7bb21c442f1ccbd3c96c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 16 Jul 2013 16:21:52 -0700 Subject: parent_table is only used internally --- .../associations/join_dependency/join_association.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'activerecord/lib/active_record/associations') diff --git a/activerecord/lib/active_record/associations/join_dependency/join_association.rb b/activerecord/lib/active_record/associations/join_dependency/join_association.rb index 3205cd41a2..8c528af399 100644 --- a/activerecord/lib/active_record/associations/join_dependency/join_association.rb +++ b/activerecord/lib/active_record/associations/join_dependency/join_association.rb @@ -25,11 +25,8 @@ module ActiveRecord attr_reader :tables delegate :options, :through_reflection, :source_reflection, :chain, :to => :reflection - delegate :table, :table_name, :to => :parent, :prefix => :parent delegate :alias_tracker, :to => :join_dependency - alias :alias_suffix :parent_table_name - def initialize(reflection, join_dependency, parent = nil) reflection.check_validity! @@ -47,6 +44,9 @@ module ActiveRecord @tables = construct_tables.reverse end + def parent_table_name; parent.table_name; end + alias :alias_suffix :parent_table_name + def ==(other) other.class == self.class && other.reflection == reflection && @@ -68,7 +68,7 @@ module ActiveRecord joins = [] tables = @tables.dup - foreign_table = parent_table + foreign_table = parent.table foreign_klass = parent.base_klass scope_chain_iter = reflection.scope_chain.reverse_each -- cgit v1.2.3