Deprecate string options in URL helpers#17743
Conversation
|
I think this would need a changelog |
|
If you want to credit someone else, put both names in the changelog, and at the bottom of the commit message put |
eedc183 to
3da29bd
Compare
|
Thanks for the feedback! Made the suggested changes and added a changelog entry. |
❤️ |
There was a problem hiding this comment.
We have a pretty complex logic here without test. For example, why were are using ||=? Why we need to check if value is present?
I'd add tests for these cases to make sure we don't have regressions on this code.
|
This looks good to me |
There was a problem hiding this comment.
Maybe it would be better to write
if options && (deprecated_string_options = options & DEPRECATED_STRING_OPTIONS)
and we use the deprecated_string_options variable to print the correct message and to iterate on the each loop.
This way to deleting an option that doesn't existe there.
There was a problem hiding this comment.
That would need to be on the keys specifically. I think that'd be more readable on two lines, as well. :)
3da29bd to
8b59aa2
Compare
There was a problem hiding this comment.
Does it need to be a set now?
There was a problem hiding this comment.
Nope. I'm about to merge, will fix as I merge.
8b59aa2 to
4d84922
Compare
Fixes rails#16958 [Byron Bischoff & Melanie Gilman]
4d84922 to
ce28e89
Compare
|
Gah... We tried to update the changelog format at the same time. This was merged. |
Add release note for #17743 [ci skip]
|
Something is wrong with this: admin_dashboard_path(params)Where |
Fixes #16958
I pretty much implemented @bronzle's fix in the issue comments, so he should have credit too.