Ruby on rails 告诉AuthLogic不要使用密码确认
我有这样的看法: new.html.haml _form.html.haml 导致此错误消息: 1错误禁止保存此用户 以下字段存在问题:Ruby on rails 告诉AuthLogic不要使用密码确认,ruby-on-rails,authlogic,user-experience,password-confirmation,Ruby On Rails,Authlogic,User Experience,Password Confirmation,我有这样的看法: new.html.haml _form.html.haml 导致此错误消息: 1错误禁止保存此用户 以下字段存在问题: 密码确认太短(最少4个字符) 我不需要密码确认。密码确认很糟糕,它们阻止了超快注册,这太棒了!有人能告诉我如何禁用密码确认吗?谢谢。试试这个: class User < ActiveRecord::Base acts_as_authentic do |c| c.require_password_confirmation = false
- 密码确认太短(最少4个字符)
class User < ActiveRecord::Base
acts_as_authentic do |c|
c.require_password_confirmation = false
end
end
class用户
有关更多详细信息,请参阅。Harish,我们是否可以仅在特定情况下禁用密码确认?以下是我的问题。你能回答这个问题吗
= form.label :email
= form.text_field :email
%br/
= form.label :password, form.object.new_record? ? nil : "Change password"
= form.password_field :password
class User < ActiveRecord::Base
acts_as_authentic do |c|
c.require_password_confirmation = false
end
end