method
derive_primary_key_name
derive_primary_key_name()
private
Hide source
# File activerecord/lib/active_record/reflection.rb, line 298 def derive_primary_key_name if belongs_to? "#{name}_id" elsif options[:as] "#{options[:as]}_id" else active_record.name.foreign_key end end