Mercurial > hg > soundsoftware-site
diff 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 |
line wrap: on
line diff
--- a/app/models/user.rb Mon Jan 24 14:35:24 2011 +0000 +++ b/app/models/user.rb Mon Feb 07 12:52:57 2011 +0000 @@ -79,6 +79,8 @@ validates_length_of :mail, :maximum => 60, :allow_nil => true validates_confirmation_of :password, :allow_nil => true + validates_acceptance_of :terms_and_conditions, :on => :create, :message => :must_accept_terms_and_conditions + def before_create self.mail_notification = Setting.default_notification_option if self.mail_notification.blank? true