Skip to content

Commit

Permalink
Validate presence of password
Browse files Browse the repository at this point in the history
  • Loading branch information
binarylogic committed Nov 21, 2008
1 parent 4701f19 commit 847ac88
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/user.rb
Expand Up @@ -2,6 +2,7 @@ class User < ActiveRecord::Base
acts_as_authentic :allow_blank_login_and_password_fields => true

validates_presence_of :login, :if => Proc.new { |user| user.openid_identifier.blank? }
validates_presence_of :password, :if => Proc.new { |user| user.openid_identifier.blank? }
validate :normalize_openid_identifier
validates_uniqueness_of :openid_identifier, :allow_blank => true

Expand Down

0 comments on commit 847ac88

Please sign in to comment.