active_model_serializers
active_model_serializers copied to clipboard
ActiveModel::Serializer implementation and Rails hooks
add meta
#### Purpose #### Changes #### Caveats #### Related GitHub issues #### Additional helpful information
expected: no errors when serializing actual: error when serializing ```ruby ModelSerializer.new(model).as_json(root: false) ``` active_model_serializers (0.10.14) ruby 3.2.2 (2023-03-30 revision e51014f9c0) +YJIT [arm64-darwin22] Darwin computer.dorianmarie.fr 23.2.0 Darwin Kernel Version 23.2.0: Wed...
I was seeing some failures when running tests against Ruby 3. It seems like all the problems were in the test code and not the library code so I updated...
#### Purpose see: https://github.com/rails-api/active_model_serializers/pull/2370 #### Changes - **change#1**: only initialize `ActiveModel::Serializer::Fieldset` when fieldset is not nil - ~**change#2**: only ask for `fields_for` when `fieldset` is not nil~ #### Caveats NA...
#### Expected behavior vs actual behavior I'm setup de _key_transform_ option to use _camel_lower_. With custom serializers, works great. Example:  checkout the _createdAt_ and _updatedAt_, they are being transformed....
#### Expected behavior vs actual behavior I have a scenario similar to that outlined in [the documentation](https://github.com/rails-api/active_model_serializers/blob/v0.10.6/docs/general/adapters.md#include-option). I want to restrict the fields serialized on my associations via the controller...
The `include` option with Json adapter works the same as with the JsonApi adapter, but it's not written anywhere in the docs.
Currently, we're using jbuilder in our existing app and now I'm thinking to move it to AMS but we've different structure of JSON, so I can't used the existing adapter....
I'm building a rails app off a tutorial I found and am trying to use a JSONAPI Active Model Serializer to generate a response of that format. In an initializer,...
Just renaming the class to follow docs/rfcs/0000-namespace.md