Redirecting to different action based on role in cancancan rails 4

345 views Asked by At

How do you redirect to some action with cancancan based on role? Suppose I want the client role to be redirected to some different controller action, and all other roles to the default action.

for example:

def index

end

Is also the root action and after signing in all users redirected to index action.

Note: I use devise with cancancan.

0

There are 0 answers