2010-02-25 18:05:10 -05:00
|
|
|
module ActionController
|
|
|
|
module UrlFor
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
2010-08-03 13:36:53 -04:00
|
|
|
include AbstractController::UrlFor
|
2010-02-25 18:05:10 -05:00
|
|
|
|
2010-02-26 18:20:41 -05:00
|
|
|
def url_options
|
2010-07-09 04:25:10 -04:00
|
|
|
options = {}
|
2010-07-14 03:17:24 -04:00
|
|
|
if _routes.equal?(env["action_dispatch.routes"])
|
2010-08-01 20:55:01 -04:00
|
|
|
options[:script_name] = request.script_name.dup
|
2010-07-09 04:25:10 -04:00
|
|
|
end
|
2010-07-08 09:42:40 -04:00
|
|
|
|
|
|
|
super.merge(options).reverse_merge(
|
2010-02-25 18:05:10 -05:00
|
|
|
:host => request.host_with_port,
|
|
|
|
:protocol => request.protocol,
|
|
|
|
:_path_segments => request.symbolized_path_parameters
|
2010-07-08 19:22:18 -04:00
|
|
|
)
|
2010-02-25 18:05:10 -05:00
|
|
|
end
|
|
|
|
end
|
2010-07-01 18:29:20 -04:00
|
|
|
end
|