You can override the default_serializer_options method on the controller to disable serializers for all actions in this controller.
def default_serializer_options { serializer: nil } end
We are currently creating JSON in other ways, but I wanted to explore ActiveModel::Serializers for a specific resource. This is when I discovered that adding a gem means that all controllers will try to use serializers. Not only the one in which I wanted to test the approach.
Using serializers by default is in full swing, but it will take us some time to move existing controllers to this approach. I updated these other existing controllers to not use serializers (using the above method), so I can add controller-based serializers on the controller in the future.
source share