Merge pull request #2340 from rails-api/action_dispatch_response_media_type

Configure `ActionDispatch::Response#content_type` behavior on Rails 6+
This commit is contained in:
Wasif Hossain 2019-08-24 01:18:21 +06:00 committed by GitHub
commit e349395869
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -12,7 +12,7 @@ ruby_supported_versions:
jruby_supported_versions:
- &jruby_9_1 jruby-9.1.17.0
- &jruby_9_2 jruby-9.2.7.0
- &jruby_9_2 jruby-9.2.8.0
- &jruby_head jruby-head
jdk_supported_versions:

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