Class: ArUser

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/models/activerecord_user.rb

Overview

require ‘logger’ ActiveRecord::Base.logger = Logger.new(STDOUT)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#passwordObject

Returns the value of attribute password.



31
32
33
# File 'lib/models/activerecord_user.rb', line 31

def password
  @password
end

#password_confirmationObject

Returns the value of attribute password_confirmation.



31
32
33
# File 'lib/models/activerecord_user.rb', line 31

def password_confirmation
  @password_confirmation
end

Instance Method Details

#admin?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/models/activerecord_user.rb', line 45

def admin?
  self.permission_level == -1 || self.id == 1
end

#site_admin?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/models/activerecord_user.rb', line 49

def site_admin?
  self.id == 1
end

#to_aryObject



53
54
55
# File 'lib/models/activerecord_user.rb', line 53

def to_ary
  self.attributes.values
end