Adam Pallozzi

Joined

110 Experience
1 Lesson Completed
0 Questions Solved

Activity

Hey Chris, great lesson! I'm using Cancancan in a project with fairly complex permissioning and looking to implement a system like you describe at the end where we create a json object based on what will be on the page then use JS to show/hide actions. Do you have any thoughts on how to do this without creating more N+1 problems when creating the json object?
Cancancan don't seem to have any way to easily go from their Ability class to something like a json object so I'm thinking I'll have to create something custom. Although this feels like a common enough problem that an extension for Cancancan may either already exist or be valuable to the community for someone (me?) to create.