Class: Permission

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/permission.rb

Overview

Schema Information

Table name: permissions

id            :integer          not null, primary key
action        :string(255)
subject_class :string(255)
subject_id    :string(255)
role_id       :integer
created_at    :datetime         not null
updated_at    :datetime         not null
sorter_id     :integer          default(0)

Constant Summary collapse

PossibleSubjectClasses =
[":all"] + ActiveRecord::Base.descendants.map(&:name)
PossibleActions =
["read", "not_read", "manage", "not_manage", "update", "not_update", "destroy", "not_destroy"]