Skip to content

Commit e349395

Browse files
authored
Merge pull request #2340 from rails-api/action_dispatch_response_media_type
Configure `ActionDispatch::Response#content_type` behavior on Rails 6+
2 parents cec9eba + 8a0dad6 commit e349395

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ruby_supported_versions:
1212

1313
jruby_supported_versions:
1414
- &jruby_9_1 jruby-9.1.17.0
15-
- &jruby_9_2 jruby-9.2.7.0
15+
- &jruby_9_2 jruby-9.2.8.0
1616
- &jruby_head jruby-head
1717

1818
jdk_supported_versions:

test/support/rails_app.rb

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ module ActiveModelSerializers
99
config.action_controller.perform_caching = true
1010
config.action_controller.cache_store = :memory_store
1111

12+
if Rails::VERSION::MAJOR >= 6
13+
config.action_dispatch.return_only_media_type_on_content_type = true
14+
end
15+
1216
config.filter_parameters += [:password]
1317
end
1418

0 commit comments

Comments
 (0)