Link with Name Attibute in Rails
I was wondering about how i can do this in rails
because i want something like
<a href="requests/13#new">Comment!<a>
开发者_如何学运维
anyone knows it?
greetings
<%= link_to "Comment!", url_for(:controller => "requests", :action => "show", :id => 13, :anchor => "new") %>
If you are working with a Request object and a restful route.
<%= link_to "Comment!", request_path(@request, :anchor => "new") %>
More details are available in the link_to helper documentation.
精彩评论