Devise

Hi, I’m working with devise for user system, but after logged in, he redirect the user for the root project. I would like to redirect each type of user for an different page. Someone already did something like that with devise?

Thanks!

Hi Fernando, check this link:

https://github.com/plataformatec/devise/wiki/How-To:-Change-the-default-sign_in-and-sign_out-routes

Devise has a pretty good user group on google, too. Jose is usually pretty responsive with any question. HTH

Bill

Hi!!

Thanks by the tip!

I already read this wiki, is pretty good! But he did not say how to change the route who redirect the user after he has login.

I’m join the group to try this response!

Thanks!!

Hi Fernando,

I think this is the wiki page you’re looking for: https://github.com/plataformatec/devise/wiki/How-to:-redirect-to-a-specific-page-on-successful-sign-in.

I've created for the root_path the special method that redirects the user again preserving flash to the place defined by the user's role.