mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
clean up add_constraints signature
This commit is contained in:
parent
a35325e324
commit
db3f50c767
1 changed files with 9 additions and 8 deletions
|
@ -12,12 +12,10 @@ module ActiveRecord
|
|||
klass = association.klass
|
||||
reflection = association.reflection
|
||||
scope = klass.unscoped
|
||||
scope.extending! Array(reflection.options[:extend])
|
||||
|
||||
owner = association.owner
|
||||
scope_chain = reflection.scope_chain
|
||||
chain = reflection.chain
|
||||
add_constraints(scope, owner, scope_chain, chain, klass, reflection)
|
||||
|
||||
scope.extending! Array(reflection.options[:extend])
|
||||
add_constraints(scope, owner, klass, reflection)
|
||||
end
|
||||
|
||||
def join_type
|
||||
|
@ -62,7 +60,10 @@ module ActiveRecord
|
|||
bind_value scope, column, value
|
||||
end
|
||||
|
||||
def add_constraints(scope, owner, scope_chain, chain, assoc_klass, refl)
|
||||
def add_constraints(scope, owner, assoc_klass, refl)
|
||||
chain = refl.chain
|
||||
scope_chain = refl.scope_chain
|
||||
|
||||
tables = construct_tables(chain, assoc_klass, refl)
|
||||
|
||||
chain.each_with_index do |reflection, i|
|
||||
|
|
Loading…
Reference in a new issue