method
association_primary_key
v4.2.1 -
Show latest stable
- Class:
ActiveRecord::Reflection::ThroughReflection
association_primary_key(klass = nil)public
We want to use the klass from this reflection, rather than just delegate straight to the source_reflection, because the source_reflection may be polymorphic. We still need to respect the source_reflection’s :primary_key option, though.