Con*_*hen 5 ruby-on-rails devise
我正在使用具有安全扩展的设计来验证强密码.
当我尝试使用已经收到的电子邮件注册帐户时,我在错误哈希中收到错误"已经收到电子邮件"两次.
我的用户模型如下所示:
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
Run Code Online (Sandbox Code Playgroud)
如果没有安全扩展(:validatable而不是:secure_validatable),我只会得到一次错误.
我究竟做错了什么?
PS奖金问题:
如何防止首先出现某些错误?我是否必须操纵设计的RegistrationsController或者有一个选项吗?
有同样的问题.
检查这是否有帮助:https://groups.google.com/forum/?fromgroups =#!topic/platforma- devise/S0nxv7BK10M
| 归档时间: |
|
| 查看次数: |
1683 次 |
| 最近记录: |