Files
fizzy/app/controllers/memberships/unlink_controller.rb
T
Mike Dalessio 89d1299ec0 Fix authentication on "untenanted" controllers
trying out the name "disallow_account_scope" for this, but I don't
think it's quite right yet.
2025-11-17 09:11:47 -05:00

18 lines
366 B
Ruby

class Memberships::UnlinkController < ApplicationController
disallow_account_scope
before_action :set_membership
def show
end
def create
@membership.destroy
redirect_to session_menu_path
end
private
def set_membership
@membership = Current.identity.memberships.find_signed!(params[:membership_id], purpose: :unlinking)
end
end