第一次进入站点根时,设计身份验证错误 [英] Devise authentication error when entering site's root first time

查看:217
本文介绍了第一次进入站点根时,设计身份验证错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户输入我们的网站根或注销时,Devise认证显示您需要先登录或注册后再继续。页面重新加载后,此消息将消失。



我们网站的根目录设置为控制器,它具有:

  before_filter:authenticate_user! 

我们需要这个控制器作为根。如何消除此消息

解决方案

我没有找到解决方案比定义



<$ p在/ config / locales / devise中,$ p> 未认证:'

en.yml文件。


When user enters our web site's root or logs out, Devise authentication displays "You need to sign in or sign up before continuing" the first time. After page reload this message disappears.

Root of our web site is set to controller which has:

before_filter :authenticate_user!

We need this controller to be the root. How to eliminate this message?

解决方案

I did not find the solution better than defining

unauthenticated: ''

in /config/locales/devise.en.yml file.

这篇关于第一次进入站点根时,设计身份验证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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