0
@@ -10,12 +10,13 @@ module AuthentableEntity
0
# Virtual attribute for the unencrypted password.
0
attr_accessor :password
0
- validates_presence_of :username, :if => :not_openid?
0
- validates_length_of :username, :within => 3..40, :if => :not_openid?
0
- validates_uniqueness_of :username, :case_sensitive => false, :allow_nil => true
0
+ validates_presence_of :username
0
+ validates_length_of :username, :within => 3..40
0
+ validates_uniqueness_of :username, :case_sensitive => false, :allow_nil => true, :message => 'is already taken; sorry!'
0
validates_presence_of :email, :if => :not_openid?
0
- validates_uniqueness_of :email, :case_sensitive => false, :allow_nil => true
0
+ validates_length_of :email, :within => 3..40, :if => :not_openid?
0
+ validates_uniqueness_of :email, :case_sensitive => false, :allow_nil => true, :message => 'is already being used; do you already have an account?'
0
with_options :if => :password_required? do |new_password|
0
new_password.validates_presence_of :password
0
@@ -27,7 +28,7 @@ module AuthentableEntity
0
before_save :encrypt_password
0
# Prevents users from submitting crafted forms that bypasses activation.
0
- attr_accessible :username, :email, :password, :password_confirmation
0
+ attr_accessible :username, :email, :password, :password_confirmation
, :identity_url0
@@ -94,7 +95,7 @@ module AuthentableEntity
Comments
No one has commented yet.