I\'m working on a project management app, and in the app, I have project_managers and clients. I\'m using Devise and CanCan for authenticat
The simplest solution is to use lambda:
lambda
root :to => 'project_managers#index', :constraints => lambda { |request| request.env['warden'].user.role == 'project_manager' } root :to => 'clients#index'