Files
fizzy/app/controllers/account/join_codes_controller.rb
T
2025-11-02 15:58:33 +01:00

29 lines
484 B
Ruby

class Account::JoinCodesController < ApplicationController
before_action :set_join_code
def show
end
def edit
end
def update
@join_code.update!(join_code_params)
redirect_to account_join_code_path
end
def destroy
@join_code.reset
redirect_to account_join_code_path
end
private
def set_join_code
@join_code = Account::JoinCode.sole
end
def join_code_params
params.expect account_join_code: [ :usage_limit ]
end
end