active_model_serializers icon indicating copy to clipboard operation
active_model_serializers copied to clipboard

ActiveModel::Serializer implementation and Rails hooks

Results 120 active_model_serializers issues
Sort by recently updated
recently updated
newest added
trafficstars

#### 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: ![image](https://github.com/rails-api/active_model_serializers/assets/26262480/5ab886b5-d7e1-407e-92f0-ee24b01e5097) 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.

V: 0.10.x
C: Good for New Contributors
C: Documentation
S: Ready for PR

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,...

S: Needs Submitter Response

Just renaming the class to follow docs/rfcs/0000-namespace.md