Fix bug preventing id overriding.

This commit is contained in:
Lucas Hosseini 2015-08-31 06:25:20 +02:00
parent f95f7369f0
commit 343f8b96bd

View File

@ -50,7 +50,8 @@ module ActiveModel
else
serializer.object.class.model_name.singular
end
id = serializer.object.id.to_s
id = serializer.id.to_s if serializer.respond_to?('id')
id ||= serializer.object.id.to_s
{ id: id, type: type }
end