Make linked resource type names consistent with root names

This commit is contained in:
Robbie Pitts 2015-01-11 14:24:01 -05:00
parent 6eb75af96b
commit 90023b1af7

View File

@ -126,7 +126,7 @@ module ActiveModel
def serialized_object_type(serializer) def serialized_object_type(serializer)
return false unless Array(serializer).first return false unless Array(serializer).first
type_name = Array(serializer).first.object.class.to_s.underscore type_name = Array(serializer).first.object.class.to_s.demodulize.underscore
if serializer.respond_to?(:first) if serializer.respond_to?(:first)
type_name.pluralize type_name.pluralize
else else