You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have used the gem to implement permitted_attributes for a subset of the nested_attributes on a model for a specific user, i.e. a user with a certain role can only update certain attributes on a nested model and none on the model itself. I can currently test this manually but am struggling to add a spec to my test suite.
The README encourages the use of pundit-matchers and I have found it useful for permitted_attributes but unfortunately it appears as though the gem doesn't support nested_attributes (issue #7) and may also be unmaintained at this point?
I imagine I'm not alone in wanting to test this at policy level so would be interested in learning how others are achieving this. Once I know I'm happy to update the documentation to help others in future.
This discussion was converted from issue #645 on January 04, 2022 15:39.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have used the gem to implement
permitted_attributes
for a subset of thenested_attributes
on a model for a specific user, i.e. a user with a certain role can only update certain attributes on a nested model and none on the model itself. I can currently test this manually but am struggling to add a spec to my test suite.The README encourages the use of pundit-matchers and I have found it useful for
permitted_attributes
but unfortunately it appears as though the gem doesn't supportnested_attributes
(issue #7) and may also be unmaintained at this point?I imagine I'm not alone in wanting to test this at policy level so would be interested in learning how others are achieving this. Once I know I'm happy to update the documentation to help others in future.
Beta Was this translation helpful? Give feedback.
All reactions