url_for([:edit, @post])
is working and generating /comments/123/edit
. Now I need to add a query parameter, so that instead of
/comments/123/edit
it is
/comments/123/edit?qp=asdf
I tried url_for([:edit, @post], :qp => "asdf")
but no go.
Use named routes.
edit_post_path(@post, :qp => "asdf")