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
Sarah Grefalda edited this page Dec 1, 2023
·
13 revisions
Example 1
Add this to your ApplicationController
classApplicationController < ActionController::Baseprotecteddefafter_sign_in_path_for(resource)# return the path based on resourceenddefafter_sign_out_path_for(resource)# return the path based on resourceendend
Example 2
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:
Some versions of Devise may have issues with properly redirecting after signing in (See Issue 4742). Upgrade to the latest version while troubleshooting to help with isolating the issue.