def url(path = nil, scheme: nil)
      return path if path && URI.parse(path).scheme
      uri = URI::Generic.build(
        scheme: scheme || env['rack.url_scheme'],
        host: env['SERVER_NAME'],
        port: env['SERVER_PORT'].to_i,
        path: env['scorched.root_path'],
      )
      if path
        path[0,0] = '/' unless path[0] == '/'
        uri.to_s.chomp('/') << path
      else
        uri.to_s
      end
    end
def url(path = nil, scheme: nil)
      return path if path && URI.parse(path).scheme
      uri = URI::Generic.build(
        scheme: scheme || env['rack.url_scheme'],
        host: env['SERVER_NAME'],
        port: env['SERVER_PORT'].to_i,
        path: env['scorched.root_path'],
      )
      if path
        path[0,0] = '/' unless path[0] == '/'
        uri.to_s.chomp('/') << path
      else
        uri.to_s
      end
    end
Takes an optional URL, relative to the applications root, and returns a fully qualified URL.
 Example: url('/example?show=30') #=> https://localhost:9292/myapp/example?show=30