mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove useless aliases
argument from JoinDependency#construct
Since `aliases` is a part of `JoinDependency` and already cached at
1a723c65bb
.
This commit is contained in:
parent
c4b58af36f
commit
15367a2c67
1 changed files with 5 additions and 5 deletions
|
@ -116,7 +116,7 @@ module ActiveRecord
|
|||
result_set.each { |row_hash|
|
||||
parent_key = primary_key ? row_hash[primary_key] : row_hash
|
||||
parent = parents[parent_key] ||= join_root.instantiate(row_hash, column_aliases, &block)
|
||||
construct(parent, join_root, row_hash, seen, model_cache, aliases)
|
||||
construct(parent, join_root, row_hash, seen, model_cache)
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -204,7 +204,7 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
def construct(ar_parent, parent, row, seen, model_cache, aliases)
|
||||
def construct(ar_parent, parent, row, seen, model_cache)
|
||||
return if ar_parent.nil?
|
||||
|
||||
parent.children.each do |node|
|
||||
|
@ -213,7 +213,7 @@ module ActiveRecord
|
|||
other.loaded!
|
||||
elsif ar_parent.association_cached?(node.reflection.name)
|
||||
model = ar_parent.association(node.reflection.name).target
|
||||
construct(model, node, row, seen, model_cache, aliases)
|
||||
construct(model, node, row, seen, model_cache)
|
||||
next
|
||||
end
|
||||
|
||||
|
@ -228,7 +228,7 @@ module ActiveRecord
|
|||
model = seen[ar_parent.object_id][node.base_klass][id]
|
||||
|
||||
if model
|
||||
construct(model, node, row, seen, model_cache, aliases)
|
||||
construct(model, node, row, seen, model_cache)
|
||||
else
|
||||
model = construct_model(ar_parent, node, row, model_cache, id, aliases)
|
||||
|
||||
|
@ -238,7 +238,7 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
seen[ar_parent.object_id][node.base_klass][id] = model
|
||||
construct(model, node, row, seen, model_cache, aliases)
|
||||
construct(model, node, row, seen, model_cache)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue