def link_to(*arguments)
      return super if defined?(super)
      
      # What follows is a very simplistic implementation of link_to
      link_text, url, html_options = arguments[0..2]
      html_options[:href] = url
      attr_string = html_options.keys.sort.map do |attribute|
        '%s="%s"' %  [Rack::Utils.escape_html(attribute), Rack::Utils.escape_html(html_options[attribute])]
      end.join(' ')
      
      # Compose the tag
      return "<a %s>%s</a>" % [attr_string, Rack::Utils::escape_html(link_text)]
    end
def link_to(*arguments)
      return super if defined?(super)
      
      # What follows is a very simplistic implementation of link_to
      link_text, url, html_options = arguments[0..2]
      html_options[:href] = url
      attr_string = html_options.keys.sort.map do |attribute|
        '%s="%s"' %  [Rack::Utils.escape_html(attribute), Rack::Utils.escape_html(html_options[attribute])]
      end.join(' ')
      
      # Compose the tag
      return "<a %s>%s</a>" % [attr_string, Rack::Utils::escape_html(link_text)]
    end
This Rails method is overridden to provide compatibility with other frameworks. By default it will just call super
 if super is provided. However, you will need your application to provide a standard url_for method
 in the context where this helper is used. For that you could use https://github.com/emk/sinatra-url-for/