5.9 added the possibility to exit a beerclub

This commit is contained in:
Aaro Koivukangas
2023-11-20 15:29:28 +02:00
parent 7bdfb41058
commit 03232ae423
2 changed files with 7 additions and 2 deletions
+2 -1
View File
@@ -54,10 +54,11 @@ class MembershipsController < ApplicationController
# DELETE /memberships/1 or /memberships/1.json
def destroy
@user = @membership.user
@membership.destroy
respond_to do |format|
format.html { redirect_to memberships_url, notice: "Membership was successfully destroyed." }
format.html { redirect_to user_path(@user), notice: "Successfully exited the group." }
format.json { head :no_content }
end
end