active_model_serializers
active_model_serializers copied to clipboard
Fix wrong type for polymorphic association while deserialization
trafficstars
while deserializing any polymorphic relation, the type of the record was coming wrong. (e.g, for a relation of type 'BlogPost', the type was coming out as 'Blog-post'). This was happening because, we were not converting the hyphenated 'type' to underscore. This PR will do that before calling classify on the type.