I have 3 types of users in my system, And I’d like to redirect each of
for a differente page.
I know Devise have a helper to do this, but I’m getting some problems to
I’m started trying from the documentation
In “class ApplicationController < ActionController::Base”
if resource.is_a?(User) && resource.can_publish?
But I’m get a error “undefined method `can_publish?’ for
I also tryed another examples who I found through google. But when I
implement, nothing happens. I’m a bit lost for doing this.
I’d like to put conditionals in controller to get a type from each user
redirect them for an especific page. For example
if current_user.type == “Admin”
The question is: The place when I have to do this is really the
And someone know any example who works correctly?
thanks for help!