aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/lib/active_record/associations/join_dependency/join_association.rb4
1 files changed, 1 insertions, 3 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 13e3cf8012..d83c01c819 100644
--- a/activerecord/lib/active_record/associations/join_dependency/join_association.rb
+++ b/activerecord/lib/active_record/associations/join_dependency/join_association.rb
@@ -15,8 +15,6 @@ module ActiveRecord
attr_accessor :tables
- delegate :chain, :to => :reflection
-
def initialize(reflection, index, join_type)
super(reflection.klass)
@@ -42,7 +40,7 @@ module ActiveRecord
# The chain starts with the target table, but we want to end with it here (makes
# more sense in this context), so we reverse
- chain.reverse_each do |reflection|
+ reflection.chain.reverse_each do |reflection|
table = tables.shift
klass = reflection.klass