1
0

sessions_controller.rb 469 B

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