Heidi Wilkerson


10 Experience
0 Lessons Completed
0 Questions Solved


Posted in How to add logo image to mailer

This approach is very interesting and I would like to understand and use it in a larger scale.
Also, eagerly waiting for the Rolify video as promised :)

So, the thing I don't fully understand here is, how to approach it when I need to add dynamic permissions for other models, too. Let's say PostCategory as video talks about Posts (and there will naturally be many many more).

How would I then scale configuration on the roles?
Adding flat attributes, where in this case i would say post_category_read, post_category_create in addition to the ones for Post, or maybe a nested JSON, where i would have post: { read, create, etc. }, post_category : {read, create, etc...} - if nesting is even possible, not sure right now.

Or maybe creating a separate attributes on Role altogether. Like post_permissions, post_category_permissions, etc...

Maybe I got it all wrong in the first place. I am a bit scared going this way and realizing it doesn't scale in a good way. Thanks for any tips. A review of the best and freshest gaming devices, of course. After all, insiders of all countries write articles here and we will be the first to learn about the world's new products.

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.