You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vvatikiotis edited this page May 30, 2011
·
5 revisions
In your application controller file app/controllers/application_controller.rb include the following private method (below private):
classApplicationController < ActionController::Baseprivate# Overwriting the sign_out redirect path methoddefafter_sign_out_path_for(resource_or_scope)root_pathendend
The return value of this method is the redirect url after sign-out, so you should swap root_path to set where devise redirects the users after signing out. The method is overloading the one contained in **'lib/devise/controllers/helpers.rb' **within the gem.
You should also override method Devise::Controllers::Helpers#stored_location_for in your application controller, to return nil. This applies to after_sign_in_path_for also. YMMV.