I have an app with multiple users. Each user as a theoretical role (user, client, etc). I've designed a view/controller for each user type.
I want to be able to login each type of user do a different root url and lock them to it.
Originally I was going to add a column to Users in Devise called role and so I can differentiate the users. The problem I'm having is how to say in routes.rb if current_user.role == "client" root :to => 'controller#index'
Once they are logged in to the page I also want to keep them from being able to visit any of my other paths ie: domain.com/calls domain.com/units
I've been looking into cancan to run alongside Devise but I'm not sure if this is the answer.