From b697ba9fd72ac8701747863b42082e59f13ba678 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Fri, 9 Jul 2010 10:25:10 +0200 Subject: Added some more tests for url generation between Engine and Application --- actionpack/lib/action_controller/metal/url_for.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/metal/url_for.rb b/actionpack/lib/action_controller/metal/url_for.rb index ae628df81c..c1f1be3bef 100644 --- a/actionpack/lib/action_controller/metal/url_for.rb +++ b/actionpack/lib/action_controller/metal/url_for.rb @@ -5,10 +5,10 @@ module ActionController include ActionDispatch::Routing::UrlFor def url_options - options = {} - if respond_to?(:env) && env && _routes.equal?(env["action_dispatch.routes"]) - options[:script_name] = request.script_name - end + options = {} + if respond_to?(:env) && env && _routes.equal?(env["action_dispatch.routes"]) + options[:script_name] = request.script_name + end super.merge(options).reverse_merge( :host => request.host_with_port, -- cgit v1.2.3