I have this:
class Users::SessionsController < Devise::SessionsController
def after_sign_in_path_for(resource)
super
end
super redirect to root_path and i dont want to do it. I need to redirect other view
I have this:
class Users::SessionsController < Devise::SessionsController
def after_sign_in_path_for(resource)
super
end
super redirect to root_path and i dont want to do it. I need to redirect other view
I think copy the code from devise is better way to redirect to the page where ever you want.
Devise will look for a scoped model “root path” to redirect, and then if it doesn’t find one, it will redirect to root page.
So, if your model is “User”, u can create something like this in your routes.rb:
get “begin”, to: “services#new”, as: “user_root”
This way you can redirect to whichever view you want.