Module: Permisi::Backend::ActiveRecord

Defined in:
lib/permisi/backend/active_record.rb,
lib/permisi/backend/active_record/role.rb,
lib/permisi/backend/active_record/actor.rb,
lib/permisi/backend/active_record/actor_role.rb

Defined Under Namespace

Classes: Actor, ActorRole, Role

Class Method Summary collapse

Class Method Details

.actorsObject



17
18
19
# File 'lib/permisi/backend/active_record.rb', line 17

def actors
  Actor.all
end

.findsert_actor(aka) ⇒ Object



13
14
15
# File 'lib/permisi/backend/active_record.rb', line 13

def findsert_actor(aka)
  Actor.find_or_create_by(aka: aka)
end

.rolesObject



21
22
23
# File 'lib/permisi/backend/active_record.rb', line 21

def roles
  Role.all
end

.table_name_prefixObject



9
10
11
# File 'lib/permisi/backend/active_record.rb', line 9

def table_name_prefix
  "permisi_"
end