Reputation: 458
I am trying to refresh the invitations page when an admin sends out an invite (instead of redirecting to the root path). The Devise Invitable documentation says:
After an invitation is created and sent, the inviter will be redirected to after_invite_path_for(inviter, invitee), which is stored path or the same path as after_sign_in_path_for by default.
However how exactly do I incorporate this in to my app? I have it set up where an admin invites a user.
Here is my invitations controller:
class Users::InvitationsController < Devise::InvitationsController
def new
super
end
def create
super
end
end
Upvotes: 0
Views: 104
Reputation: 458
I figured it out. I added the following to my application controller
def after_invite_path_for(resource)
new_user_invitation_path
end
Upvotes: 0