Adding users and roles to Mcc-Workflow
12 Jan 2019Decided to add users and roles for MCC-Workflow as I prepare to invite writers and editors. Thank you Devise and CanCanCan for making everything super easy!
Steps I followed:
- Adding basic authentication with Devise
- Adding Roles with CanCanCan
- Added rails_admingem- Handle role exception gracefully
        - Make cancan use application controller
            - Make sure you use main_app.root_path Fixes error ActionController::UrlGenerationError (No route matches {:action=>"home", :controller=>"pages"}):
 
- Make sure you use main_app.root_path Fixes error 
 
- Make cancan use application controller
            
 
- Handle role exception gracefully