Forum: Ruby on Rails link_to helper not reaching external link

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
3f22c7b525c0b5242532c1989e1c6ee4?d=identicon&s=25 Michelle L. (mlbagel)
on 2016-08-11 16:34
Attachment: _form.erb (2 KB)
Attachment: pins_controller.rb (827 Bytes)
RoR newbie and working on a pinning app similar to pinterest.
In my form_for helper  I  try to link_to an external web page
<%= link_to @pin.url, "http://#{@pin.url}" %> but I get
No route matches [GET] "/"
and the server is trying to reach

I can't seem to get rid of the local call.
I've attached both my partial form view for create and update, and the
controller file as well.
Would appreciate a FULL answer.  My online course instructor is useless
and keeps giving me the same answer as I typed above but 'duh' already
did that, now what???
C02768bdfe6afc7aae8fea3ee0be97d2?d=identicon&s=25 Ben T. (ben-toogood)
on 2016-08-30 17:41
Hey Michelle,

Checkout the URL Helpers Reference:

Alternatively, I'd suggest just using an <a> tag and setting the href
attribute to the link.

Hope this helps

This topic is locked and can not be replied to.