ActiveAdmin与Rails的设计两次登录 [英] ActiveAdmin with Devise Rails login twice
问题描述
我有一个已经设置为使用制定
与用户<α
的Rails
应用/ code>模式。我只是添加 ActiveAdmin
,它使用一个单独的模型名称 ADMINUSER
。这种新的模式也使用设计。我的问题是:
I have a Rails
app that was already setup to use devise
with User
model. I just add ActiveAdmin
and it uses a separate model name AdminUser
. This new model also uses devise. The problem that I have is:
当我去本地主机:3000 /系统管理员
- 管理员登录页面,应用程序先引导我到本地主机:3000 /用户/ sign_in
- 普通用户登录页面。换句话说,要到管理页面,我必须登录两次。
When I go to localhost:3000/admin
- the admin login page, the app directs me first to localhost:3000/users/sign_in
- the general user login page. In other words, to go to admin page, I have to login twice.
反正是有解决这个问题?
Is there anyway to fix this?
推荐答案
我试图加入到配置/初始化/ active_admin.rb
这样的:
config.skip_before_filter :authenticate_user!
和它的作品。
这篇关于ActiveAdmin与Rails的设计两次登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!