method
get_bind_values
v7.2.3 -
Show latest stable
- Class:
ActiveRecord::Associations::AssociationScope
get_bind_values(owner, chain)public
No documentation available.
# File activerecord/lib/active_record/associations/association_scope.rb, line 34
def self.get_bind_values(owner, chain)
binds = []
last_reflection = chain.last
binds.push(*last_reflection.join_id_for(owner))
if last_reflection.type
binds << owner.class.polymorphic_name
end
chain.each_cons(2).each do |reflection, next_reflection|
if reflection.type
binds << next_reflection.klass.polymorphic_name
end
end
binds
end