abstract class ApplicationPolicy(T)
- ApplicationPolicy(T)
- Reference
- Object
Overview
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.
Defined in:
pundit/application_policy.crConstructors
-
.new(user : User?, record : T? = nil)
A policy takes in a user that might be nil, as well as an object that may be nil.
Instance Method Summary
-
#create?
Whether or not the
Createaction can be accessed -
#delete?
Whether or not the
Deleteaction can be accessed -
#edit?
Whether or not the
Editaction can be accessed -
#index?
Whether or not the
Indexaction can be accessed -
#new?
Whether or not the
Newaction can be accessed - #record
-
#show?
Whether or not the
Showaction can be accessed -
#update?
Whether or not the
Updateaction can be accessed - #user
Constructor Detail
def self.new(user : User?, record : T? = 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.