In my Rails app (with devise authentication) anyone can start creating a post, but if not signed in when they hit save/create/post they first have to create a user name or login = perfect.
My code:
before_filter :authenticate_user!, :except => [:show, :index, :new, :edit]
Sadly once they signed in it either redirects to the index page or back to the post, but everything is gone and subsequently the user has to start over again.
How can I change the redirect and also how can I stop the post from being lost after login again?
I know its something to do with:
def after_sign_up_path_for(resource)
new_user_confirmation_path
end