link_to rails helper到外部链接会引发错误

时间:2015-03-27 17:19:57

标签: ruby-on-rails routes

这是我的链接:

<strong>Shortened Url:</strong> <%= link_to link.short_url, "http://www.google.com/search?q=balut+egg&espv=2&biw=1280&bih=678&source=lnms&tbm=isch&sa=X&ei=CngVVanlMIG5ogSap4GQDQ&ved=0CAYQ_AUoAQ#imgdii=_&imgrc=qnYT21R-r5VDRM%253A%3BIbuD8fXhkqTEDM%3Bhttp%253A%252F%252Fwww.bizarrefood.com%252Fblog%252Fwp-content%252Fuploads%252F2012%252F08%252Fbalut.jpg%3Bhttp%253A%252F%252Fwww.bizarrefood.com%252Fblog%252Ffertilized-duck-embryo-balut%252F%3B295%3B300", class: "short-link" %>

我得到的错误是:

ActionController::RoutingError:  
       No route matches [GET] "/search"

为什么要寻找内部路线?我该如何解决这个问题?

0 个答案:

没有答案