varvet/pundit

[Request] Generate policy file when using scaffolding

Open

#735 opened on May 9, 2022

 (4 comments) (1 reaction) (0 assignees)Ruby (643 forks)batch import
good first issue

Repository metrics

Stars
 (8,501 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Hi,

It would be great if running

rails g scaffold Model
rails g controller Model

would actually generate an empty policy file that inherits from ApplicationPolicy.

As a bonus, for resources scaffolding, maybe we could implements all CRUD actions and defaults to false.

Contributor guide