Ruby On Rails - Devise Redirect Back To The Original Location After Sign In Or Sign Up? - Stack Overflow
Ruby On Rails - Devise Redirect Back To The Original Location After Sign In Or Sign Up? - Stack Overflow. But sign out is still returning to root. Making statements based on opinion;
But the browser (firefox) gave me this error : What happens if your user user cannot access a resource in your application? I can't figure out why. When i tried to create a new organization it said current password can't be blank, even when it wasn't. Devise automatically redirects on sign in and sign up as long as you store the location of the current page using devise's store_location_for(resource). To get the latest version, simply type: Devise_for :users, :controllers => { registrations: Devise provides you a method called authenticate_user! For now, everything else seems to be working, except the sign up redirect. Unable to redirect from one page to other using devise.
Thanks for contributing an answer to stack overflow! Not sure what else to. I got around this by removing :validatable.which isn't ideal, but was functional. Some suggested on stack overflow to restart the terminal. You can create an after_sign_in_path_for method in your application controller. Provide details and share your research! Making statements based on opinion; Def after_sign_in_path_for(resource) if resource.sign_in_count == 1 user_path(resource) else stored_location_for(resource) || users_path end end we are using the numbers of times the users has logged to the system, resource.sign in count , and if this number is 1 it has to be the first time, or in my case, after the user sign_up And i made the method in the registrations controller : I've tried overriding registrationscontroller and i've tried adding an applicationscontroller function like : If we're on a devise page, we don't want.