Ruby On Rails - Devise Redirect Back To The Original Location After Sign In Or Sign Up? - Stack Overflow

Computer ID5c1154bd90969

Ruby On Rails - Devise Redirect Back To The Original Location After Sign In Or Sign Up? - Stack Overflow. January 23, 2019 · 15.7k · marko klemetti. Unable to redirect from one page to other using devise.

Computer ID5c1154bd90969
Computer ID5c1154bd90969

Am ende musste ich laufen: Devise is giving me a pretty hard time. Thanks for contributing an answer to stack overflow! You could do this by overriding the sessionscontroller, storing it, and then just call super. I am aware of these guides: Was sie tun wollen, ist, keines der vorkompilierten rubine zu verwenden und stattdessen ruby auf ihrem lokalen rechner zu kompilieren, so: I got around this by removing :validatable.which isn't ideal, but was functional. Provide details and share your research! When i tried to create a new organization it said current password can't be blank, even when it wasn't. Actually i am a newbie to rails.

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 I tried adding what i believe is the path the rails to the path in.bash_profile. And i made the method in the registrations controller : You could do this by overriding the sessionscontroller, storing it, and then just call super. Provide details and share your research! I use redirect loop with devise after_sign_in_path_for link for my problem but it does not work for me. But sign out is still returning to root. Do you redirect the user back to the previous page? In rails 5 the mechanism was changed from simple redirect_to :back to dedicated function: Am ende musste ich laufen: Back them up with references or personal experience.