active_model_serializers
active_model_serializers copied to clipboard
ActiveModel::Serializer implementation and Rails hooks
Changelog seems to stop at 0.10.6. Current release is 0.10.7.
#### Expected behavior vs actual behavior ## Expected Behavior ``` -- create_table("comments", {:force=>:cascade}) -> 0.0066s -- create_table("posts", {:force=>:cascade}) -> 0.0029s -- create_table("users", {:force=>:cascade}) -> 0.0017s Warming up -------------------------------------- ams 2.000...
Tried debugging but didn't get anywhere. Maybe a problem caused by namespace. #### Using ``` active_model_serializers ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-linux] Rails 5.0.2 Ubuntu 14.04 64bits ``` #### Serializers...
#### Expected behavior vs actual behavior Expected behavior: Serializing a null resource returns `{ data: null }` Actual behavior: Serializing a null resource returns `{ data: { type: '(something)' }...
#### Expected behavior vs actual behavior If attributes list has keyword, the serializer will be failed, the error is `Rendered ActiveModel::Serializer::CollectionSerializer with ActiveModelSerializers::Adapter::Attributes ArgumentError: wrong number of arguments (given 0,...
I think the default behavior of AMS should be to error if a serializer cannot be found. Otherwise, it's easy to stumble into a major security hole. Imagine you have...
#### Purpose The JSON API spec allows for the [relationships key](http://jsonapi.org/format/#document-resource-object-relationships) to include one of `data`, `links` or `meta`. The current parsing logic for the deserialiser raises an exception unless...
Singularizing polymorphic association types allows you to use plural or singular type values in your requests as allowed by JSON API. Because ActiveRecord calls #constantize on the polymorphic association type...
#### Expected behavior vs actual behavior I was trying to implement the links behavior described in how_to/add_relationship_links.md When I implement def links as described I get `undefined method 'api_v1_entity_url'` Same...
#### Purpose This allows AMS 0.9x to be used with Rails 5, without any errors. #### Changes Added an `api_controller.rb` template that the Rails 5 Generator expects. #### Caveats This...