Mercurial > hg > soundsoftware-site
diff app/models/user.rb @ 60:cf39b52d24b4 luisf
DEVELOPMENT COMMIT: The description can now be seen and edited BUT when a new user registers the informations is not saved to the correct table.
author | luisf |
---|---|
date | Wed, 01 Dec 2010 18:04:19 +0000 |
parents | 7ff14a13f48a |
children | 9d42bcda8cea |
line wrap: on
line diff
--- a/app/models/user.rb Wed Dec 01 00:21:03 2010 +0000 +++ b/app/models/user.rb Wed Dec 01 18:04:19 2010 +0000 @@ -64,6 +64,9 @@ attr_protected :login, :admin, :password, :password_confirmation, :hashed_password, :group_ids validates_presence_of :login, :firstname, :lastname, :mail, :if => Proc.new { |user| !user.is_a?(AnonymousUser) } + + # TODO: is this validation correct validates_presence_of :ssamr_user_detail + validates_uniqueness_of :login, :if => Proc.new { |user| !user.login.blank? }, :case_sensitive => false validates_uniqueness_of :mail, :if => Proc.new { |user| !user.mail.blank? }, :case_sensitive => false # Login must contain lettres, numbers, underscores only