method
new
rails latest stable - Class:
ActiveRecord::Associations::JoinDependency::Aliases
new(tables)public
No documentation available.
# File activerecord/lib/active_record/associations/join_dependency.rb, line 14
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