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.

17 lines
386 B

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