You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
475 B

  1. # frozen_string_literal: true
  2. class Settings::SessionsController < ApplicationController
  3. before_action :set_session, only: :destroy
  4. before_action :set_body_classes
  5. def destroy
  6. @session.destroy!
  7. flash[:notice] = I18n.t('sessions.revoke_success')
  8. redirect_to edit_user_registration_path
  9. end
  10. private
  11. def set_session
  12. @session = current_user.session_activations.find(params[:id])
  13. end
  14. def set_body_classes
  15. @body_classes = 'admin'
  16. end
  17. end