about summary refs log tree commit diff
path: root/app/controllers/auth
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/auth')
-rw-r--r--app/controllers/auth/confirmations_controller.rb3
-rw-r--r--app/controllers/auth/sessions_controller.rb8
2 files changed, 10 insertions, 1 deletions
diff --git a/app/controllers/auth/confirmations_controller.rb b/app/controllers/auth/confirmations_controller.rb
new file mode 100644
index 000000000..b8e9316f1
--- /dev/null
+++ b/app/controllers/auth/confirmations_controller.rb
@@ -0,0 +1,3 @@
+class Auth::ConfirmationsController < Devise::ConfirmationsController
+  layout 'auth'
+end
diff --git a/app/controllers/auth/sessions_controller.rb b/app/controllers/auth/sessions_controller.rb
index e50a9835c..bd41ffd3d 100644
--- a/app/controllers/auth/sessions_controller.rb
+++ b/app/controllers/auth/sessions_controller.rb
@@ -12,6 +12,12 @@ class Auth::SessionsController < Devise::SessionsController
   protected
 
   def after_sign_in_path_for(_resource)
-    stored_location_for(:user) || root_path
+    last_url = stored_location_for(:user)
+
+    if [about_path].include?(last_url)
+      root_path
+    else
+      last_url || root_path
+    end
   end
 end