muhammadyana said about 4 years ago on Rails dynamic role management :
i have created like this but it's not best practice and bad code, and only crud not with custom action. like in this picture
http://prnt.sc/s425dy