class ActiveRecord::Associations::JoinDependency::Aliases
def initialize(tables)
def initialize(tables) @tables = tables @alias_cache = tables.each_with_object({}) { |table, h| h[table.node] = table.columns.each_with_object({}) { |column, i| i[column.name] = column.alias } } @columns_cache = tables.each_with_object({}) { |table, h| h[table.node] = table.columns } end