I\'m trying to create unique anchors for every comment on my blog so a person can take the url of an anchor and paste it in their browser, which will automatically load the
Here's an improvement on @XGamerX's answer.
<%= link_to '#', [comment.post, { anchor: dom_id(comment) }] %>
Or
<%= link_to '#', post_path(comment.post, anchor: dom_id(comment)) %>