Passing param values to redirect_to as querystring in rails

后端 未结 2 984
梦如初夏
梦如初夏 2021-01-31 17:16

This should be simple, but I can\'t seem to find an easy answer.

How can I pass param values from the current request into a redirect_to call? I have some form values I

2条回答
  •  耶瑟儿~
    2021-01-31 17:46

    To add to Jordan's answer:

    If you don't know what type of object @thing might be, you can use the universal polymorphic_url method. This is the method that is called internally when you pass in an object to redirect_to anyway.

提交回复
热议问题