active_model_serializers icon indicating copy to clipboard operation
active_model_serializers copied to clipboard

Fix wrong type for polymorphic association while deserialization

Open vivektiwary opened this issue 7 years ago • 0 comments
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.

Purpose

Changes

Caveats

Related GitHub issues

Additional helpful information

vivektiwary avatar Jul 11 '18 05:07 vivektiwary