ActiveAdmin与Rails的设计两次登录 [英] ActiveAdmin with Devise Rails login twice

查看:135
本文介绍了ActiveAdmin与Rails的设计两次登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个已经设置为使用制定用户<α的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆