class

CanCan::ControllerResource

Inherits Reference < Object

Constructors

new(controller : ControllerAdditions, name : Symbol | Nil = nil, *, parent_flag : Bool | Nil = nil, through : Symbol | Nil = nil, through_association : Symbol | Nil = nil, singleton : Bool = false, shallow : Bool = false, model : ActiveRecord::Base.class | Symbol | Nil = nil, instance_name_opt : Symbol | Nil = nil, find_by : Symbol | Nil = nil, id_param_opt : Symbol | Nil = nil, collection_actions_opt : Array(Symbol) | Nil = nil, new_actions_opt : Array(Symbol) | Nil = nil, parent_action : Symbol | Nil = nil)

Class methods

param_attrs(params : ParamHash) : Hash(String, ActiveRecord::Value)

ParamValue hash → ActiveRecord attribute hash.

Instance methods

authorize_resource
load_and_authorize_resource
load_resource
parent?
resource_class

The class used for loading and authorizing. class: false in the gem becomes a Symbol subject (authorization only, nothing to load).