Closed. This question needs to be more focused. It is not currently accepting answers. Learn more
想改进这个问题吗更新问题,使其只关注一个问题editing this post
四年前关闭。
我正在为用户身份验证实现authlogic。
我想删除用户名验证,以便在数据库中存在多个用户名相同的用户。
我该怎么做到
有什么帮助吗
谢谢

最佳答案

如果是电子邮件验证:

acts_as_authentic do |c|
  c.validate_email_field = false
end

如果有用户名字段验证:
acts_as_authentic do |c|
  c.validate_login_field = false
end

07-25 23:54
查看更多