开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜