Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails Devise invitable redirect

Im playing around with the Devise invitable gem: https://github.com/scambra/devise_invitable

It's working fine.

But how do i redirect to a specific page on a successful invitation?

like image 662
andkjaer Avatar asked Jan 10 '11 15:01

andkjaer


1 Answers

From the devise invitable readme:

After an invitation is accepted, the invitee will be redirected to after_accept_path_for(resource), which is the same path as after_sign_in_path_for by default. If you want to override the path, override invitations controller and define after_accept_path_for method. This is useful in the common case that a user is invited to a specific location in your application. More on Devise's README, "Controller filters and helpers" section.

like image 163
Paul Avatar answered Sep 23 '22 00:09

Paul