Almost 1 hour of digging before i gave up and built this…
(Does not support https yet)

  # /abs -> http://myx.com/abs
  def path_to_url(path)
    "http://#{request.host_with_port_without_standard_port_handling}/#{path.sub(%r[^/],'')}"
  end
Advertisement