Rails 3.1.3 using anchor attribute with link_to tag from posts/index to posts/show/id not working
问题 I am using a link_to tag on my posts/index view and want to link it to my posts/show/id view with an anchor that makes it scroll down to the comments form. For some reason I can't get the anchor to work. Here is my code: In posts/index <%= link_to 'Add a Comment', post, :anchor => 'comment_form' %> This fails to append the # sign to the end of the link, so it is just localhost:3000/posts/id. I have also tried many variations for link_to, including: <%= link_to 'Add a Comment', post(:anchor =>