aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorJONBRWN <jonathanbrown.a@gmail.com>2014-11-13 19:03:38 -0500
committerSantiago Pastorino <santiago@wyeworks.com>2014-11-25 10:27:34 -0200
commit1e5290a743f03a132fe82bf0c4631ee5a587c6a4 (patch)
treee5d58963f5aee873be369c3939c6348c1a3b6567 /actionpack/lib/action_dispatch
parentae5538ca6b25582be9676ce8f66b0e07d34fbc31 (diff)
downloadrails-1e5290a743f03a132fe82bf0c4631ee5a587c6a4.tar.gz
rails-1e5290a743f03a132fe82bf0c4631ee5a587c6a4.tar.bz2
rails-1e5290a743f03a132fe82bf0c4631ee5a587c6a4.zip
sets script_name to always be a string.
Closes #17615 #17616 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 Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index dcfb819906..6e3ae36a7f 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -749,7 +749,7 @@ module ActionDispatch
end
def find_script_name(options)
- options.delete(:script_name) { '' }
+ options.delete(:script_name) || ''
end
def path_for(options, route_name = nil) # :nodoc: