Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Revert "Remove deprecated :text option to render"" #37580

Merged

Conversation

Hamms
Copy link
Contributor

@Hamms Hamms commented Oct 30, 2020

Reverts #37571, restoring #37509

It turns out I was slightly wrong about my understanding of the deprecation.

render text used to be able to either render just a raw text response OR render text into an html layout, with the use of the layout keyword. This behavior was confusing, so render text was broken up into render plain and render html; in my upgrade, I naively updated all uses of render text to render plain, breaking the single use of it that should have been render html.

That update has now been fixed, and a test case has been added that would have caught the regression.

@Hamms Hamms added the Rails Upgrade All work related to upgrading the version of Ruby on Rails we use. label Oct 30, 2020
@Hamms Hamms marked this pull request as ready for review October 30, 2020 22:21
@@ -142,7 +142,7 @@ def pd_progress
)
render(
layout: 'application',
text: "PD progress data not found for #{sanitized_script_name}.",
plain: "PD progress data not found for #{sanitized_script_name}.",
Copy link
Member

Choose a reason for hiding this comment

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

These two seem worth verifying before merging since they also specify a layout.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh wow, nice catch; I literally looked right at these and didn't see a layout 🙃

Copy link
Member

@davidsbailey davidsbailey left a comment

Choose a reason for hiding this comment

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

thank you for adding tests!

@Hamms Hamms mentioned this pull request Nov 2, 2020
8 tasks
@Hamms Hamms merged commit 086dbab into staging Nov 2, 2020
@Hamms Hamms deleted the revert-37571-revert-37509-remove-deprecated-text-render branch November 2, 2020 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rails Upgrade All work related to upgrading the version of Ruby on Rails we use.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants