class

ApplicationPolicy(T)

Inherits Reference / Object

The default Pundit policy that all other policies should inherit from.

Should you with to update the default policy definitions, run lucky pundit.init and override where needed.

Constructors

new(user : User | Nil, record : T | Nil = nil)

A policy takes in a user that might be nil, as well as an object that may be nil.

These are available in all policy check methods for access.

Source

Instance methods

create?

Whether or not the Create action can be accessed

Source
delete?

Whether or not the Delete action can be accessed

Source
edit?

Whether or not the Edit action can be accessed

Source
index?

Whether or not the Index action can be accessed

Source
new?

Whether or not the New action can be accessed

Source
record
Source
show?

Whether or not the Show action can be accessed

Source
update?

Whether or not the Update action can be accessed

Source
user
Source