我试图找出如何在rails中编写链接(作为
如何将其转换为rails链接?
<a href='' class='her-sweep-to-bottom'>
link_to dashboard_path(@profile.dashboard)
<br><br>
<span>Dashboard</span>
</a>
答案 0 :(得分:2)
<br><br>
<%= link_to dashboard_path(@profile.dashboard), class: "her-sweep-to-bottom" do %>
<span>Dashboard</span>
<% end %>
答案 1 :(得分:0)
试试这个:
<%= link_to "Dashboard", dashboard_path(@profile.dashboard) %>
答案 2 :(得分:0)
试
<%= link_to 'nameoflink', {:controller => 'nameofcontroller', :action => 'nameofaction'} %>