Class: DoorMat::SessionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- DoorMat::SessionsController
- Defined in:
- app/controllers/door_mat/sessions_controller.rb
Instance Method Summary collapse
-
#terminate ⇒ Object
This is to let the user terminate an existing session from a different browser or device see sign_in#destroy for the termination of the current active session in use.
Methods included from Controller
#config_url_redirect, #handle_unverified_request, #lockdown, #main_app_root_url, #protected_by_password_less_session, #require_confirmed_email, #require_password_reconfirm, #require_valid_session, #sign_out, #update_session_last_activity_time
Instance Method Details
#terminate ⇒ Object
This is to let the user terminate an existing session from a different browser or device see sign_in#destroy for the termination of the current active session in use
7 8 9 10 11 12 13 14 |
# File 'app/controllers/door_mat/sessions_controller.rb', line 7 def terminate session_guid = params[:guid] Session.current_session.actor.sessions.where(hashed_token: session_guid).each do |session| session.destroy end redirect_to :back end |