added email validation and tthen saved any params they were entering during signup in an @user object

This commit is contained in:
Ken Johnson
2013-04-28 02:49:02 -04:00
parent 6d24bf8993
commit d01e508bc3
10 changed files with 68 additions and 6 deletions
+1
View File
@@ -4,6 +4,7 @@ class User < ActiveRecord::Base
validates_presence_of :password, :on => :create
validates_presence_of :email
validates_uniqueness_of :email
validates_format_of :email, :with => /.+@.+\..+/i
def self.authenticate(email, password)
auth = nil