Possible duplicate:
Full Authentication Error Message with Rails
I play with Rails 3.1rc1 and I think that SecurePassword will be useful for me. But I don't like the default error message, Password digest can't be blank
. If I called validates_presence_of :password_digest
myself, I could pass :message => "Password can't be blank"
, but because he is not sure in the structure how to redefine the message, delete the word "digest" , which will only confuse the user joe . Does anyone know how to do this?
Edit:
I tried adding "override": validates_presence_of
as follows:
class User < ActiveRecord::Base attr_accessible :email, :password has_secure_password validates_presence_of :password_digest, :message => "Password can't be blank" end
But when you try to send an empty password, you just get double errors:
Invalid form
- Digest Password Cannot Be Empty
- Digest Password Password cannot be empty
Meltemi
source share