I use devise and cancancan for login and roles. In my little rails app generator project: https://github.com/dgleba/bashrail there are scripts for this. Even if you don't use the scripts, they document exactly how to implement it in that case.
look at: https://github.com/dgleba/bashrail/blob/master/devise1.sh https://github.com/dgleba/bashrail/blob/master/cancan1.sh When I am learning something like this I strip the scripts down to just what is needed to create an app with the feature I am studing. This app, https://github.com/dgleba/brail351d <https://github.com/dgleba/brail351d>, was generated by bashrail and has fully functional roles like mention in your question. David On Thursday, July 13, 2017 at 4:43:41 PM UTC-4, babacar thiam wrote: > > Hello guys i want to implement rbac autorisation for a rails app. > i use devise to generate user and i have a product controllers. > am a beginners at rails and i want to use: > user role show > admin role edit > speruser role delete > I don't know how to implement this i use cancan and i have a problem to > affect a role to a user > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c13f1b34-b2f7-4cbf-ab20-14b94ef17100%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.