link_to tag on same page rails 3
If you want to link to an anchor tag on the same page the visitor is currently viewing, you can shorten the link_to
code a bit:
<%= link_to "Comment wall", anchor: "wall" %>
link_to can also produce links with anchors or query strings:
http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html
link_to "Comment wall", profile_path(@profile, :anchor => "wall")
# => <a href="/profiles/1#wall">Comment wall</a>