【发布时间】:2015-08-16 21:00:18
【问题描述】:
这是我的代码
<a <%= link_to "open your box", gig_path(@gig), class: "mcnButton", target: "_blank", style: "font-weight: bold;letter-spacing: 0px;line-height: 100%;text-align: center;text-decoration: none;color: #FFFFFF;"%></a>
来自以上<%= link_to "open your box", gig_path(@gig)
注意 gig_path(@gig) 它给了我 url http://gigs/3,它运行良好,它找到了我需要的 gig id:3 问题是它没有像这样提供完整的 url
http://example.com/gigs/3
附:作为参考,我可以做@gig.title,@gig.description 并且没有问题。
【问题讨论】:
标签: html ruby-on-rails ruby ruby-on-rails-4 model-view-controller