How can I redirect a user’s home (root) path based on their role using Devise?

Your routes.rb file won’t have any idea what role the user has, so you won’t be able to use it to assign specific root routes. What you can do is set up a controller (for example, passthrough_controller.rb) which in turn can read the role and redirect. Something like this: # passthrough_controller.rb class PassthroughController < ApplicationController … Read more