[feat-req] Redirect after sign up.
I'm looking through the docs trying to find a way for sign_up to redirect to a "you've been registered, check your email for a confirmation link" type page.
Is there already a standard way of accomplishing this?
There is not an explicit hook, but I'm sure this has been already discussed in the mailing list. If possible, please consider adding the required information to the wiki. :)
I see now that I can override User::RegistrationsController#create which I think would accomplish my goal.
While it would be nice to have an after_sign_up_path_for(resource) I've never "contributed" with git before and haven't the faintest idea where to start to roll up my sleeves.
BUT, when I get it working with a User::RegistrationsController I will most certainly add it to the wiki.
This works but it's not very sturdy... http://gist.github.com/456119
Is there a way to test if "confirmable" is devised? Something like (psudocode) if confirmable_is_devised redirect_to "some confirmation page" else sign_in_and_redirect(resource_name, resource) end
I imagine it would break if config.confirm_within is greater than zero. Maybe not break but it would act unexpectedly.
Lastly (third edit now), I googled my head off but it seems that everyone wants to know how to redirect but without confirmable turned on. Once confirmable is turned on and confirm_within = 0 all of the examples stop doing what I need them to do.
confirmable_is_devised == just check if the resource responds to "confirm!"
http://gist.github.com/456297
If you take a look at that you'll see that while it works nicely for my needs, it may break in awesome and fiery ways depending on whether or not someone is using scopes. I personally am not so it works fine. If you think it's worthy of a wiki entry I'll write something up explaining what I did.