Generate
Create a new Pundit policy.
Command
Arguments
[NAME]
- The name of the policy.
Options/flags
--headless
alias-H
, (Default: False)Specify whether or not to generate a headless policy (a policy which does not have a corresponding model).
--permissions
alias-p
Permissions to generate along with the policy.
Examples
$ eucalypt s policy g product
Generate a
product
policy with default options.$ eucalypt s policy g post -H
Generate a headless
post
policy.$ eucalypt s policy g product -p add edit delete
Generate a
product
policy with permissions toadd
,edit
anddelete
.$ eucalypt s policy g post -Hp create edit delete
Generate a headless
post
policy with permissions tocreate
,edit
anddelete
.
Last updated