aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-07-16 16:21:52 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-07-16 16:21:52 -0700
commit6356d42093b10866f18d7bb21c442f1ccbd3c96c (patch)
tree1391888db7bc630b5fb1dfea405346b0c4a64928 /activerecord/lib
parent85fe5edcec77f96923ed4f4e8b63a247ebe6b055 (diff)
downloadrails-6356d42093b10866f18d7bb21c442f1ccbd3c96c.tar.gz
rails-6356d42093b10866f18d7bb21c442f1ccbd3c96c.tar.bz2
rails-6356d42093b10866f18d7bb21c442f1ccbd3c96c.zip
parent_table is only used internally
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/associations/join_dependency/join_association.rb8
1 files changed, 4 insertions, 4 deletions
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