gpt4 book ai didi

ruby-on-rails - Rails 设计可邀请重定向

转载 作者:行者123 更新时间:2023-12-04 17:40:45 25 4
gpt4 key购买 nike

我正在玩设计邀请 gem :https://github.com/scambra/devise_invitable

它工作正常。

但是如何在成功邀请后重定向到特定页面?

最佳答案

来自 devise invitable readme :

After an invitation is accepted, the invitee will be redirected to after_accept_path_for(resource), which is the same path as after_sign_in_path_for by default. If you want to override the path, override invitations controller and define after_accept_path_for method. This is useful in the common case that a user is invited to a specific location in your application. More on Devise's README, "Controller filters and helpers" section.

关于ruby-on-rails - Rails 设计可邀请重定向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4648220/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com