class ActiveModel::Serializer::Associations::HasMany

def key

:nodoc:
def key
  if key = option(:key)
    key
  elsif embed_ids?
    "#{@name.to_s.singularize}_ids".to_sym
  else
    @name
  end
end