method
derive_primary_key_name

Ruby on Rails latest stable (v7.1.3.2)
-
0 notes -
Class: ActiveRecord::Reflection::AssociationReflection
derive_primary_key_name()
private
Hide source
# File activerecord/lib/active_record/reflection.rb, line 323 def derive_primary_key_name if belongs_to? "#{name}_id" elsif options[:as] "#{options[:as]}_id" else active_record.name.foreign_key end end