Query parameters with url_for?

后端 未结 4 1449
耶瑟儿~
耶瑟儿~ 2021-01-03 17:45
url_for([:edit, @post])

is working and generating /comments/123/edit. Now I need to add a query parameter, so that instead of

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-03 18:45

    Use named routes.

    edit_post_path(@post, :qp => "asdf")
    

提交回复
热议问题