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:
parent
c48c111bb2
commit
680464bd2f
1 changed files with 2 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue