class Admin < ActiveRecord::Base
 
    attr_accessible :login, :email, :firstname, :name, :password, :password_confirmation, :avatar
  
    has_secure_password
    validates_presence_of :password, :on => :create
    validates :email, :uniqueness => true
    validates :login, :presence => true, :uniqueness => true
    
    mount_uploader :avatar, AvatarUploader
 
end
