Skip to content

How To: Redirect to a specific page on successful sign in and sign out

Sergey Kishenin edited this page · 2 revisions
Clone this wiki locally

You can override the default behaviour by creating an after_sign_in_path_for [RDoc] method in your ApplicationController and have it return the path for the page you want:

def after_sign_in_path_for(resource)

There exists a similar method for sign out; after_sign_out_path_for [RDoc]

Keeping user on the same page after signing out

def after_sign_out_path_for(resource_or_scope)
Something went wrong with that request. Please try again.