OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / models / demand_user.rb
1 class DemandUser < ActiveRecord::Base
2   has_one :demander
3   
4   # Include default devise modules. Others available are:
5   # :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
6   devise :database_authenticatable, :registerable,
7          :recoverable, :rememberable, :trackable, :validatable 
8   # Setup accessible (or protected) attributes for your model
9   attr_accessible :email, :password, :password_confirmation, :remember_me
10   
11   def create_token
12     self.ensure_authentication_token
13     self.save
14   end
15   
16   def delete_token
17     self.authentication_token = nil
18     self.save
19   end
20   
21 end