Class: Spina::User

Inherits:
ApplicationRecord show all
Defined in:
app/models/spina/user.rb

Instance Method Summary collapse

Instance Method Details

#admin?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/models/spina/user.rb', line 11

def admin?
  admin
end

#to_sObject



15
16
17
# File 'app/models/spina/user.rb', line 15

def to_s
  name
end

#update_last_logged_in!Object



19
20
21
22
# File 'app/models/spina/user.rb', line 19

def update_last_logged_in!
  self.last_logged_in = Time.now
  self.save!
end