I have a Rails app in which one type of user may invite another to create an account by means of devise_invitable.
I'm sending the invitation email, and when the invitee follows the link, I'd like them to enter some information, click 'submit', and then prompt them to create a password.
The invitation mechanism is working fine, and when the invitee enters their information, it is saved to their profile, and the invitation is marked as accepted, as I wanted. However, I don't know how to redirect the user to a new password page after they accept the invite. I set up an after_accept_path_for
method in the ApplicationController, but I can't get it to go to my new page. (My new page is a form with password
and password_confirmation
fields). It's essentially a custom 'edit user' page with just those fields.
How do I get devise_invitable
to redirect to this new form page?