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