Mercurial > hg > soundsoftware-site
comparison app/models/user.rb @ 193:90cc857e968a luisf
Merge from branch "feature_64"
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Mon, 07 Feb 2011 12:52:57 +0000 |
parents | 440c4f4bf2d6 |
children | 73ff0e6a11b1 b15397a5341c |
comparison
equal
deleted
inserted
replaced
151:e5171a80c541 | 193:90cc857e968a |
---|---|
76 validates_format_of :firstname, :lastname, :with => /^[\w\s\'\-\.]*$/i | 76 validates_format_of :firstname, :lastname, :with => /^[\w\s\'\-\.]*$/i |
77 validates_length_of :firstname, :lastname, :maximum => 30 | 77 validates_length_of :firstname, :lastname, :maximum => 30 |
78 validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :allow_nil => true | 78 validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :allow_nil => true |
79 validates_length_of :mail, :maximum => 60, :allow_nil => true | 79 validates_length_of :mail, :maximum => 60, :allow_nil => true |
80 validates_confirmation_of :password, :allow_nil => true | 80 validates_confirmation_of :password, :allow_nil => true |
81 | |
82 validates_acceptance_of :terms_and_conditions, :on => :create, :message => :must_accept_terms_and_conditions | |
81 | 83 |
82 def before_create | 84 def before_create |
83 self.mail_notification = Setting.default_notification_option if self.mail_notification.blank? | 85 self.mail_notification = Setting.default_notification_option if self.mail_notification.blank? |
84 true | 86 true |
85 end | 87 end |