method
new
v5.2.3 -
Show latest stable
- Class:
ActiveRecord::Associations::JoinDependency::Aliases
new(tables)public
No documentation available.
# File activerecord/lib/active_record/associations/join_dependency.rb, line 10
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
}
}
@name_and_alias_cache = tables.each_with_object({}) { |table, h|
h[table.node] = table.columns.map { |column|
[column.name, column.alias]
}
}
end