Class: Iron::User

Inherits:
ApplicationRecord show all
Includes:
Deactivatable, Role
Defined in:
app/models/iron/user.rb

Defined Under Namespace

Modules: Deactivatable, Role

Constant Summary collapse

ADMIN_LANGUAGES =
%w[en it].freeze

Constants included from Role

Role::PEOPLE_ROLES

Instance Method Summary collapse

Methods included from Role

#can_administer?, #can_write?

Methods included from Deactivatable

#deactivate, #reactivate

Instance Method Details

#current?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'app/models/iron/user.rb', line 24

def current?
  self == Current.user
end

#initialsObject



28
29
30
# File 'app/models/iron/user.rb', line 28

def initials
  name[0..1]
end