Class: User

Inherits:
Rubee::SequelObject show all
Defined in:
lib/app/models/user.rb,
lib/tests/example_models/user.rb

Overview

WARNING: User model is required for JWT authentification If you remove or modify it, make sure all changes are inlined with AuthTokenMiddleware and AuthTokenable modules

Constant Summary collapse

ROLES =

Mandatory hash const required for authorizable

{ admin: 1, user: 0 }.freeze

Instance Attribute Summary collapse

Method Summary

Methods inherited from Rubee::SequelObject

all, #assign_attributes, count, create, dataset, db_set?, #destroy, destroy_all, find, find_first, find_last, find_or_new, first, force_disconnect!, force_reconnect!, holds, join, last, limit, offset, order, owns_many, owns_one, paginate, #persisted?, reconnect!, #reload, #save, serialize, #update, validate_before_persist!, where

Methods included from Rubee::DatabaseObjectable

included

Instance Attribute Details

#createdObject

Returns the value of attribute created.



5
6
7
# File 'lib/app/models/user.rb', line 5

def created
  @created
end

#emailObject

Returns the value of attribute email.



5
6
7
# File 'lib/app/models/user.rb', line 5

def email
  @email
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/app/models/user.rb', line 5

def id
  @id
end

#passwordObject

Returns the value of attribute password.



5
6
7
# File 'lib/app/models/user.rb', line 5

def password
  @password
end

#roleObject

Returns the value of attribute role.



5
6
7
# File 'lib/app/models/user.rb', line 5

def role
  @role
end

#updatedObject

Returns the value of attribute updated.



5
6
7
# File 'lib/app/models/user.rb', line 5

def updated
  @updated
end