[WIP] Allow users to opt-out from the ActionController extensions #1636
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
ActionController::Serialization
into the controllerChanges
Add
ActionController::Serialization.enabled = false
to an initializer and it won't be mixed in.Caveats
This doesn't exactly solve #1500 since it doesn't include any AMS code in the controller, and passing
serializer
oreach_serializer
won't workPerhaps config should come from Rails, rather than be set on the mixin. e.g.
Rails.configuration.action_controller.render_json_with_active_model_serializers = false
Related GitHub issues
serializer_lookup_enabled
in controller doesn't retain Adapter for entire render #1500And many more
Additional helpful information
cc @trek