Configure ActionDispatch::Response#content_type behavior on Rails 6+

in order to retain old behavior,
set `config.action_dispatch.return_only_media_type_on_content_type`
to true

it can also be configured by setting
`ActionDispatch::Response.return_only_media_type_on_content_type`
This commit is contained in:
Wasif Hossain 2019-06-08 23:45:21 +06:00
parent cec9ebab7b
commit 55a6b23cd8
No known key found for this signature in database
GPG Key ID: 14C15A54E34D7803

View File

@ -9,6 +9,10 @@ module ActiveModelSerializers
config.action_controller.perform_caching = true
config.action_controller.cache_store = :memory_store
if Rails::VERSION::MAJOR >= 6
config.action_dispatch.return_only_media_type_on_content_type = true
end
config.filter_parameters += [:password]
end