url_for([:edit, @post])
正在运行并生成/comments/123/edit
个.现在我需要添加一个查询参数
/comments/123/edit
它是
/comments/123/edit?qp=asdf
我试了url_for([:edit, @post], :qp => "asdf")
次,但没有成功.
url_for([:edit, @post])
正在运行并生成/comments/123/edit
个.现在我需要添加一个查询参数
/comments/123/edit
它是
/comments/123/edit?qp=asdf
我试了url_for([:edit, @post], :qp => "asdf")
次,但没有成功.
使用命名路由.
edit_post_path(@post, :qp => "asdf")