External link recognized as a route path

时间:2018-03-25 20:54:10

标签: ruby-on-rails hyperlink routes sinatra haml

Using Haml, Sinatra. I set a path to an external link like the code below, and when I click the link,Sinatra takes me to '/www.test.com'.

%a{:href => "www.shunsukekohari.com"} test

1 个答案:

答案 0 :(得分:0)

It's a standard anchor tag and href uses relative path unless you include a protocol so try:

%a{:href => "http://www.shunsukekohari.com"} test