1
我有<div id="all-comments">Comments</div>
部分在我的文章顯示頁面。我在我的帖子索引頁上有一個鏈接,其中顯示了評論數量,當點擊評論時,我想要轉到example.com/posts/1#all-comments
。
現在我正在使用<%= link_to post_path(@post) %>
- 這會生成example.com/posts/1
,但我希望#最後的所有評論。Rails轉到另一頁特別部分
在此先感謝。