1 class User < ActiveRecord::Base
4 # Include default devise modules. Others available are:
5 # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
6 devise :database_authenticatable, :registerable,
7 :recoverable, :rememberable, :trackable, :token_authenticatable, :validatable#, :confirmable
9 # Setup accessible (or protected) attributes for your model
10 attr_accessible :id, :name, :password, :password_confirmation, :remember_me , :email
13 r.build_author :name => 'no name'
17 self.ensure_authentication_token
22 self.authentication_token = nil