diff --git a/app/models/user.rb b/app/models/user.rb index 58d45c3c2..9b6410966 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -21,8 +21,11 @@ class User ######## Making things work ######## key :email, String - validates_true_for :email, :logic => lambda { |email| - email.include?('@pivotallabs.com') || email.include?('@pivotalsf.com')} + validates_true_for :email, :logic => lambda { self.pivotal_email?} + + def pivotal_email? + email.include?('@pivotallabs.com') + end def method_missing(method, *args) self.person.send(method, *args)