varvet / pundit

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

Pass block as argument of describe call. #737

Open boof opened 2 years ago

boof commented 2 years ago

Hey there,

we recently running into this issue while trying to extend the permissions example group that the block cannot be extended as expected (eg. using module_eval in combination with instance_eval).

It also shortens the code. :)

Burgestrand commented 2 months ago

Hi! Sorry, you never received a reply.

What I'm missing here is an actual test of behaviour that this change fixes. I'm not against the change, but I don't understand why the change.

Any code change carries some level of risk, and that needs to be balanced by some value received with the change usually demonstrated through an automated test.