aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/url_rewriter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/url_rewriter.rb')
-rw-r--r--actionpack/lib/action_controller/url_rewriter.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/url_rewriter.rb b/actionpack/lib/action_controller/url_rewriter.rb
index 8821892b3a..981865517f 100644
--- a/actionpack/lib/action_controller/url_rewriter.rb
+++ b/actionpack/lib/action_controller/url_rewriter.rb
@@ -32,7 +32,6 @@ module ActionController
# ROUTES TODO: Fix the tests
segments = options.delete(:_path_segments)
- relative_url_root = options.delete(:script_name).to_s
path_segments = path_segments ? path_segments.merge(segments || {}) : segments
unless options[:only_path]
@@ -50,8 +49,7 @@ module ActionController
path_options = yield(path_options) if block_given?
path = router.generate(path_options, path_segments || {})
- # ROUTES TODO: This can be called directly, so relative_url_root should probably be set in the router
- rewritten_url << relative_url_root
+ # ROUTES TODO: This can be called directly, so script_name should probably be set in the router
rewritten_url << (options[:trailing_slash] ? path.sub(/\?|\z/) { "/" + $& } : path)
rewritten_url << "##{Rack::Utils.escape(options[:anchor].to_param.to_s)}" if options[:anchor]