ruby on rails - How do I prevent getting a routing error while trying to access a href -


i have href rendered "www.yahoo.com", when user clicks on instead of re-directing http://www.yahoo.com page says route not found error. how fix this?

try this:

<%= link_to "click me", "http://www.yahoo.com" %> 

it's need put http:// before address.

updated (according comment)

ok this:

let,

@url = "www.yahoo.com" 

now,

<%= link_to "click me", "http://#{@url}" %> 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -