1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

map the association chain to table names

This commit is contained in:
Aaron Patterson 2013-10-03 11:04:29 -07:00
parent c48c111bb2
commit 680464bd2f

View file

@ -10,14 +10,12 @@ module ActiveRecord
private
def construct_tables
tables = []
chain.each do |reflection|
tables << alias_tracker.aliased_table_for(
chain.map do |reflection|
alias_tracker.aliased_table_for(
table_name_for(reflection),
table_alias_for(reflection, reflection != self.reflection)
)
end
tables
end
def table_name_for(reflection)