diff options
Diffstat (limited to 'activerecord/lib/active_record/associations/join_dependency/join_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/join_dependency/join_association.rb | 13 |
1 files changed, 4 insertions, 9 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 0d3834240c..63f084426b 100644 --- a/activerecord/lib/active_record/associations/join_dependency/join_association.rb +++ b/activerecord/lib/active_record/associations/join_dependency/join_association.rb @@ -15,24 +15,19 @@ module ActiveRecord # These implement abstract methods from the superclass attr_reader :aliased_prefix - attr_reader :tables - attr_reader :alias_tracker + attr_accessor :tables delegate :options, :through_reflection, :source_reflection, :chain, :to => :reflection - def initialize(reflection, index, parent, join_type, alias_tracker) - super(reflection.klass, parent) + def initialize(reflection, index, join_type) + super(reflection.klass) @reflection = reflection - @alias_tracker = alias_tracker @join_type = join_type @aliased_prefix = "t#{ index }" - @tables = construct_tables.reverse + @tables = nil end - def parent_table_name; parent.table_name; end - alias :alias_suffix :parent_table_name - def match?(other) return true if self == other super && reflection == other.reflection |