diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-07-09 01:22:18 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-09-03 22:59:06 +0200 |
commit | 8a077089d9b7aa89cb56ef754b4540f411453375 (patch) | |
tree | 92cf07a73c937180830c786876c506f07c851284 /actionpack/lib/action_controller/metal/url_for.rb | |
parent | b1e5e233fabe8f75ebd06e7e08c15f0eeddbae79 (diff) | |
download | rails-8a077089d9b7aa89cb56ef754b4540f411453375.tar.gz rails-8a077089d9b7aa89cb56ef754b4540f411453375.tar.bz2 rails-8a077089d9b7aa89cb56ef754b4540f411453375.zip |
Get rid of :skip_prefix options in routes
Diffstat (limited to 'actionpack/lib/action_controller/metal/url_for.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/url_for.rb | 12 |
1 files changed, 4 insertions, 8 deletions
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 |