varvet / pundit

Minimal authorization through OO design and pure Ruby classes
MIT License
8.27k stars 629 forks source link

Hook into Rails generators (scaffold, model) to generate policy classes #785

Closed joelzwarrington closed 11 months ago

joelzwarrington commented 12 months ago

I would like pundit policies to be generated when I run Rails generators such as scaffold and model, instead of having to run rails generate pundit:policy post seperately.

I wouldn't mind working on something like this, just want to see if there's appetite for it!

Burgestrand commented 11 months ago

That sounds nice. I don't personally use the generators, but I'm sure the reduced friction would be appreciated by those who do!

I'm sure the details are in here somewhere: https://guides.rubyonrails.org/generators.html

Burgestrand commented 11 months ago

This looks like a duplicate of https://github.com/varvet/pundit/issues/735 😊

… so I'm closing this in favour of moving the topic there instead!

Burgestrand commented 11 months ago

I feel GitHub is rather dismissive with "closed this as not planned" which is not really true, it just falls under the umbrella of "duplicate" 😅