3 class AssociationReflection
\r
5 return @primary_key_name if @primary_key_name
\r
7 when macro == :belongs_to
\r
8 @primary_key_name = options[:foreign_key] || class_name.foreign_key
\r
10 @primary_key_name = options[:foreign_key] || "#{options[:as]}_id"
\r
12 @primary_key_name = options[:foreign_key] || active_record.name.foreign_key
\r
14 @primary_key_name = @primary_key_name.to_composite_keys.to_s if @primary_key_name.is_a? Array
\r