Class: User

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/user.rb

Instance Method Summary collapse

Instance Method Details

#activate!Object



17
18
19
# File 'app/models/user.rb', line 17

def activate!
  self.update_attributes(:activated_at => Time.now)
end

#deliver_activation_confirmation!Object



31
32
33
34
# File 'app/models/user.rb', line 31

def deliver_activation_confirmation!
  reset_perishable_token!
  Notifier.deliver_activation_confirmation(self)
end

#deliver_activation_instructions!Object



26
27
28
29
# File 'app/models/user.rb', line 26

def deliver_activation_instructions!
  reset_perishable_token!
  Notifier.deliver_activation_instructions(self)
end

#deliver_password_reset_instructions!Object



21
22
23
24
# File 'app/models/user.rb', line 21

def deliver_password_reset_instructions!
  reset_perishable_token!
  Notifier.deliver_password_reset_instructions(self)
end

#nameObject



13
14
15
# File 'app/models/user.rb', line 13

def name
  [first_name, last_name].reject(&:blank?).join(' ')
end

#to_sObject



9
10
11
# File 'app/models/user.rb', line 9

def to_s
  first_name
end