Class: AutomaticLogout::SessionsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- AutomaticLogout::SessionsController
- Defined in:
- app/controllers/automatic_logout/sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/automatic_logout/sessions_controller.rb', line 16 def destroy session[:auto_session_expires_at] = '' session[:seconds] = '' session[:live] = !!current_user reset_session redirect_to root_path, notice: session[:message] end |
#status ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'app/controllers/automatic_logout/sessions_controller.rb', line 5 def status response = { live: !!current_user, timeout: session[:auto_session_expires_at], message: session[:message], seconds: session[:seconds] } render json: response end |