logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

sessions_controller.rb (383B)


  1. # frozen_string_literal: true
  2. class Settings::SessionsController < ApplicationController
  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