解决方法
Create custom validataion:
validate :check_email_and_password def check_email_and_password errors.add(:password,"can't be the same as email") if email == password end
但请记住,将密码存储为纯文本是不错的主意.你应该存放它的哈希.尝试一些认证插件,如authlogic或Restful authentication.