Add `policy_class` parameter to `permitted_attributes` function
Author: evgenyneuCreated Aug 3, 2022Updated Aug 8, 2024
Labelssimmering
Is it possible to add policy_class parameter to permitted_attributes function (similar to authorise)?
So I can call:
permitted_attributes(@post, :update, policy_class: MyPolicy)This is necessary for my code where the name of the policy and record class are different.
Source: varvet/pundit