How to redirect to a two different devise forms in ruby on rails

rdhanasekar Posted by rdhanasekar on April 21, 2014

I'm new to Ruby on Rails. I'm developing ruby on rails application. In that I have created two different forms. I need to redirect the form based on user type. Can any one help me to solve this please?

If the user is user1, it should go to the path /user1/invited_new

If the user is user2, it should redirect to /user2/invited_new

Here is my code

class RegistrationsController < Devise::RegistrationsController


def after_sign_up_path_for(resource)


end end