|  | @@ -1,10 +1,4 @@
 | 
											
												
													
														|  |  class AdminUser < ActiveRecord::Base
 |  |  class AdminUser < ActiveRecord::Base
 | 
											
												
													
														|  | -  # Include default devise modules. Others available are:
 |  | 
 | 
											
												
													
														|  | -  # :token_authenticatable, :confirmable,
 |  | 
 | 
											
												
													
														|  | -  # :lockable, :timeoutable and :omniauthable
 |  | 
 | 
											
												
													
														|  | -  devise :database_authenticatable, 
 |  | 
 | 
											
												
													
														|  | -         :recoverable, :rememberable, :trackable, :validatable
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |    # Setup accessible (or protected) attributes for your model
 |  |    # Setup accessible (or protected) attributes for your model
 | 
											
												
													
														|  |    attr_accessible :email, :password, :password_confirmation, :remember_me
 |  |    attr_accessible :email, :password, :password_confirmation, :remember_me
 | 
											
												
													
														|  |    # Include default devise modules. Others available are:
 |  |    # Include default devise modules. Others available are:
 | 
											
										
											
												
													
														|  | @@ -13,9 +7,9 @@ class AdminUser < ActiveRecord::Base
 | 
											
												
													
														|  |    devise :database_authenticatable, 
 |  |    devise :database_authenticatable, 
 | 
											
												
													
														|  |           :recoverable, :rememberable, :trackable, :validatable
 |  |           :recoverable, :rememberable, :trackable, :validatable
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -  # Setup accessible (or protected) attributes for your model
 |  | 
 | 
											
												
													
														|  | -  attr_accessible :email, :password, :password_confirmation, :remember_me
 |  | 
 | 
											
												
													
														|  | -  # attr_accessible :title, :body
 |  | 
 | 
											
												
													
														|  | 
 |  | +  validates :email,
 | 
											
												
													
														|  | 
 |  | +            :presence => true,
 | 
											
												
													
														|  | 
 |  | +            :format => { :with => /\A[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]+\z/, :message => "Must be of E-Mail address format" }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |    after_create { |admin| admin.send_reset_password_instructions }
 |  |    after_create { |admin| admin.send_reset_password_instructions }
 | 
											
										
											
												
													
														|  | @@ -23,4 +17,5 @@ class AdminUser < ActiveRecord::Base
 | 
											
												
													
														|  |    def password_required?
 |  |    def password_required?
 | 
											
												
													
														|  |      new_record? ? false : super
 |  |      new_record? ? false : super
 | 
											
												
													
														|  |    end
 |  |    end
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  end
 |  |  end
 |