mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
The JSON API adapater dasherizes every key, but the deserializer left the keys unaltered. Thus, the client had to send underscored keys in the request body in order for Rails to properly match sent values to model attributes. This commit adds automatic key transformation on deserialization. Per default the deserializer transforms the keys to underscore, but this behaviour can also be changed by including `key_transform` in the deserializer options. |
||
|---|---|---|
| .. | ||
| deserialization_test.rb | ||
| errors_test.rb | ||
| key_transform_test.rb | ||
| linked_test.rb | ||
| pagination_test.rb | ||