ruby-on-rails – 使用Security Extension for Devise(RoR)注册
发布时间:2020-12-17 03:22:37 所属栏目:百科 来源:网络整理
导读:我正在使用具有安全扩展的设计来验证强密码. 当我尝试使用已经收到的电子邮件注册帐户时,我在错误哈希中收到错误“已经收到电子邮件”两次. 我的用户模型如下所示: class User ActiveRecord::Base # Include default devise modules. Others available are:
我正在使用具有安全扩展的设计来验证强密码.
当我尝试使用已经收到的电子邮件注册帐户时,我在错误哈希中收到错误“已经收到电子邮件”两次. 我的用户模型如下所示: class User < ActiveRecord::Base # Include default devise modules. Others available are: # :token_authenticatable,:confirmable,# :lockable,:timeoutable and :omniauthable # :trackable deleted devise :database_authenticatable,:registerable,:secure_validatable # Setup accessible (or protected) attributes for your model attr_accessible :email,:firstname,:lastname,:password,:password_confirmation,:remember_me end 没有安全扩展(:validatable而不是:secure_validatable)我只得到一次错误. 我究竟做错了什么? 附:奖金问题: 如何防止首先出现某些错误?我是否必须操纵设计的RegistrationsController或者有一个选项吗? 解决方法
有同样的问题.
检查这是否有帮助:https://groups.google.com/forum/?fromgroups=#!topic/plataformatec-devise/S0nxv7BK10M (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |