Skip to content

Make ActionDispatch::Response#content_type behavior configurable#36490

Merged
y-yagi merged 1 commit intorails:masterfrom
y-yagi:revise_36034
Jun 21, 2019
Merged

Make ActionDispatch::Response#content_type behavior configurable#36490
y-yagi merged 1 commit intorails:masterfrom
y-yagi:revise_36034

Conversation

@y-yagi
Copy link
Member

@y-yagi y-yagi commented Jun 15, 2019

I changed return value of ActionDispatch::Response#content_type in #36034.
But this change seems to an obstacle to upgrading. #36034 (comment)

Therefore, I restored the behavior of ActionDispatch::Response#content_type to 5.2 and deprecated old behavior. Also, made it possible to control the behavior with the config.

@y-yagi y-yagi force-pushed the revise_36034 branch 2 times, most recently from ac0087d to f91d6fe Compare June 15, 2019 04:57
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If load_defaults "5.2" with upgraded Rails 6.0 app, should this option should be false?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, nevermind. New default is false, but for older load_defaults apps, setting true by the line https://github.com/rails/rails/pull/36490/files#diff-182aa02288995070b335f57216738b92R26.

I changed return value of `ActionDispatch::Response#content_type` in rails#36034.
But this change seems to an obstacle to upgrading. rails#36034 (comment)

Therefore, I restored the behavior of `ActionDispatch::Response#content_type`
to 5.2 and deprecated old behavior. Also, made it possible to control the
behavior with the config.
@y-yagi y-yagi merged commit c631e8d into rails:master Jun 21, 2019
@y-yagi y-yagi deleted the revise_36034 branch June 21, 2019 00:04
y-yagi added a commit that referenced this pull request Jun 21, 2019
Make `ActionDispatch::Response#content_type` behavior configurable
maximumtiu added a commit to maximumtiu/upgrade-rails-workshop that referenced this pull request Aug 13, 2019
rails/rails#36490 caused a deprecation warning
to be raised from within Rails.
rails/rails#36854 is the fix and has been merged
into Rails master.

This commit adds a config option as a work-around
until Rails 6.0 is officially released.
maximumtiu added a commit to maximumtiu/upgrade-rails-workshop that referenced this pull request Aug 13, 2019
rails/rails#36490 caused a deprecation warning
to be raised from within Rails.
rails/rails#36854 is the fix and has been merged
into Rails master.

This commit adds a config option as a work-around
until Rails 6.0 is officially released.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants