pundit icon indicating copy to clipboard operation
pundit copied to clipboard

Add policy_class to permitted_attributes

Open hobbypunk90 opened this issue 2 years ago • 1 comments

Fixes #742 again 😅

Sorry, i cleaned my github a bit too fast.

hobbypunk90 avatar Nov 01 '23 08:11 hobbypunk90

Hi! Thanks for the PR!

I posted a comment in the ol' issue https://github.com/varvet/pundit/issues/742#issuecomment-2026343020 about what I think we should probably do.

I'd rather avoid having to modify other methods when adding support for this, to avoid breaking existing code.

By adding a policy_class: nil parameter to permitted_attributes and only altering behaviour if that is passed we can probably add this feature without risking altering behaviour of existing code.

Burgestrand avatar Mar 29 '24 00:03 Burgestrand