mirror of
https://github.com/iritmaximus/brewery.git
synced 2026-10-12 19:13:49 +03:00
5.9 added the possibility to exit a beerclub
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user