No documentation

# File activerecord/lib/active_record/associations/association_scope.rb, line 131def add_constraints(scope,owner,assoc_klass,refl,tracker)chain=refl.chainscope_chain=refl.scope_chaintables=construct_tables(chain,assoc_klass,refl,tracker)owner_reflection=chain.lasttable=tables.lastscope=last_chain_scope(scope,table,owner_reflection,owner,tracker,assoc_klass)chain.each_with_indexdo|reflection,i|table,foreign_table=tables.shift,tables.firstunlessreflection==chain.lastnext_reflection=chain[i+1]scope=next_chain_scope(scope,table,reflection,tracker,assoc_klass,foreign_table,next_reflection)endis_first_chain=i==0klass=is_first_chain?assoc_klass:reflection.klass# Exclude the scope of the association itself, because that# was already merged in the #scope method.scope_chain[i].eachdo|scope_chain_item|item=eval_scope(klass,scope_chain_item,owner)ifscope_chain_item==refl.scopescope.merge!item.except(:where,:includes,:bind)endifis_first_chainscope.includes!item.includes_valuesendscope.unscope!(*item.unscope_values)scope.where_values+=item.where_valuesscope.bind_values+=item.bind_valuesscope.order_values|=item.order_valuesendendscopeend