Can I use redirect_to in a view in RoR?

后端 未结 5 1640
闹比i
闹比i 2021-01-04 00:28

In my app, I\'ve got a little box that appears on every page, checking on the status of requests made by the user. If a request is accepted at any time, then the user should

5条回答
  •  天命终不由人
    2021-01-04 01:18

    redirect_to is not a method of ActionView. Its a method of ActionController. You can probably use Javascript window.location.href on page load or some other event to take your user to another page.

提交回复
热议问题