diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-07-11 14:24:11 +0400 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-07-11 21:53:10 +0400 |
commit | 07b9d80604f130c5958e24651e73e889c6e43bb7 (patch) | |
tree | 96b24336593f8220410586133f00886a9976a6ae /app/controllers/sessions_controller.rb | |
parent | 55efb2d9f2f3024137cfd28ec0b58c723f044b42 (diff) |
Use devise stored_location to redirect after signing for both public and private pages.
Diffstat (limited to 'app/controllers/sessions_controller.rb')
-rw-r--r-- | app/controllers/sessions_controller.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb new file mode 100644 index 00000000000..9b7bd94c3a2 --- /dev/null +++ b/app/controllers/sessions_controller.rb @@ -0,0 +1,14 @@ +class SessionsController < Devise::SessionsController + + def new + if request.referer.present? + store_location_for(:redirect, URI(request.referer).path) + end + + super + end + + def create + super + end +end |