active_model_serializers
active_model_serializers copied to clipboard
ActiveModel::Serializer implementation and Rails hooks
I'm using ActiveModel::Serializer to format my model data as json, but I would like to change the formatting so that the associations of my main model are not nested. I...
#### Expected behavior vs actual behavior ```ruby input = {"include"=>"", "data"=> {"attributes"=> {"field_type"=>"dropdown", "name"=>"new field name", "description"=>"new field description", "enabled"=>false, "mandatory"=>true, "data"=>{"default_value"=>"new default value", "options"=>[{"OPTION 1"=>"OPTION 3"}, "new option 1",...
How can i use json adapter without root or attributes adapter with format_keys on 0.10.0 version since in my project it is required to use format_keys and no root key?...
I assume this has been discussed several times already, just want to understand whether sideloading is possible with json adapter or works only with json_api adapter? Current, I have the...
#### Expected behavior vs actual behavior Expected: Configure a cache and using the AMS serializer cache method should improve rendering performance. Actual: performance decreases AND more objects are allocated. ####...
I want to ask the same question as this one: https://github.com/rails-api/active_model_serializers/issues/1053 > I've come across a few issues that have started the discussion about including support for side-loading associations in...
#### Expected behavior vs actual behavior How to iterate through an array with relations? And how to pass through "columns"-method (example below) one serializer deeper? ### ANY help appreciated (thank...
#### Expected behavior vs actual behavior Serialize nested attributes (and exclude some attributes from rendering) I can see the children in json output but the nested Serializer is not ####...
#### Purpose In the JSON:API adapter, this will prevent `next` link URLs from being generated for nonexistent pages if the page requested is out of bounds. #### Changes Now checking...
#### Expected behavior vs actual behavior Expected the execution context (`self`) to be the same when using something like `has_one :something do` as it is with `attribute :something do`. Maybe...