From 8a077089d9b7aa89cb56ef754b4540f411453375 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Fri, 9 Jul 2010 01:22:18 +0200 Subject: Get rid of :skip_prefix options in routes --- actionpack/lib/action_controller/metal/url_for.rb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'actionpack/lib/action_controller/metal') diff --git a/actionpack/lib/action_controller/metal/url_for.rb b/actionpack/lib/action_controller/metal/url_for.rb index ca91e1f362..ae628df81c 100644 --- a/actionpack/lib/action_controller/metal/url_for.rb +++ b/actionpack/lib/action_controller/metal/url_for.rb @@ -5,20 +5,16 @@ module ActionController include ActionDispatch::Routing::UrlFor def url_options - options = {} - if respond_to?(:env) && env - if _routes.equal?(env["action_dispatch.routes"]) - options[:skip_prefix] = true - elsif env["action_dispatch.routes"] - options[:script_name] = _routes.default_url_options[:script_name] + options = {} + if respond_to?(:env) && env && _routes.equal?(env["action_dispatch.routes"]) + options[:script_name] = request.script_name end - end super.merge(options).reverse_merge( :host => request.host_with_port, :protocol => request.protocol, :_path_segments => request.symbolized_path_parameters - ).reverse_merge(:script_name => request.script_name) + ) end def _routes -- cgit v1.2.3