about summary refs log tree commit diff
path: root/app/controllers/auth/sessions_controller.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-02 17:11:08 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-02 17:11:08 +0200
commita0f85774c482716505b0c8c8faf59616f06245d9 (patch)
tree1b6fcb0380bde66b9bf01de2520a974ac5f665ae /app/controllers/auth/sessions_controller.rb
parent6d7290f47c11c08b55d6066d5123b8b9f04cf0bc (diff)
Redirect after sign in to previous page (unless it's a sign in/up/etc page)
Diffstat (limited to 'app/controllers/auth/sessions_controller.rb')
-rw-r--r--app/controllers/auth/sessions_controller.rb2
1 files changed, 1 insertions, 1 deletions
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