Reputation: 1
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
Upvotes: 0
Views: 139
Reputation: 176412
<%= 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.
Upvotes: 3