From a0f85774c482716505b0c8c8faf59616f06245d9 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 2 Oct 2016 17:11:08 +0200 Subject: Redirect after sign in to previous page (unless it's a sign in/up/etc page) --- app/controllers/auth/sessions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/auth') diff --git a/app/controllers/auth/sessions_controller.rb b/app/controllers/auth/sessions_controller.rb index 1418ab2ca..e50a9835c 100644 --- a/app/controllers/auth/sessions_controller.rb +++ b/app/controllers/auth/sessions_controller.rb @@ -12,6 +12,6 @@ class Auth::SessionsController < Devise::SessionsController protected def after_sign_in_path_for(_resource) - root_path + stored_location_for(:user) || root_path end end -- cgit