设计:如何创建已经登录的新用户? [英] Devise: How to create a new user being already logged in?
本文介绍了设计:如何创建已经登录的新用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要创建一个多用户应用程序,所以我将有一个管理员用户可以创建新的应用程序。
I'm going to create a multi user app, so, I will have a admin user that will have permission to create new ones.
我创建了 UsersController
,但是当尝试创建一个新用户时,我已经登录,我正在重定向到root_path,并显示一条错误消息,表示您已经登录。
I've created the UsersController
but when trying to create a new user, being already signed in, I'm getting redirect to root_path with an error message that says "You are already signed in".
那么我应该怎么做才能实现?
So, what should I do to make this possible?
推荐答案
找到。
我刚刚从设计中删除了可注册的
模块,它的工作原理。
I have just to removed the registerable
module from devise and it works.
这篇关于设计:如何创建已经登录的新用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文