When I was developing my RoR skills with some basic tutorials I encountered a problem. What I am trying to achieve is having comments belonging to posts, with no separate index or individual view. This part was easy.
Here comes tough one. I want post_comment_url
to return address with fragment identifier: http://example.com/posts/2#comment-4
. It would allow me to use redirect_to
in it's simplest form, without :anchor
parameter (which would be against ruby way of keeping things simple).
How to do that?