-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
sets script_name to always be a string. #17616
sets script_name to always be a string. #17616
Conversation
see issue: rails#17615 when script_name is nil in the options hash, script_name is set to nil. options = {script_name: nil} script_name = options.delete(:script_name) {‘’} # => nil
I guess it can just be |
@egilburg Yeah, that's what I did in my pull request |
@JONBRWN I see the following diff options.delete(:script_name) { '' } || '' Whereas I think it can be simplified to: options.delete(:script_name) || '' Since you are always assigning |
@egilburg you are correct, long day! Will edit the pull request when I get home |
think of using
|
@sandipransing @egilburg's solution should be accepted: options.delete(:script_name) || '' |
@tenderlove what do you think? Seeing as you refactored this method in 8cbcd19 |
Seems like a reasonable change, but let me make sure the tests are OK first. |
dont we need a regression test for this too? |
@tenderlove @arthurnn let me know if there's something I can do on my part with the testing |
@JONBRWN we need a test for sure. |
Closed by 1e5290a |
see issue: #17615
and commit: 8cbcd19
which states script_name should always return a string
when script_name is nil in the options hash, script_name is set to nil.