parent
ac7149fbe5
commit
b9614a8212
1 changed files with 2 additions and 0 deletions
|
|
@ -85,7 +85,9 @@ class ConferenceRegistrationsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
|
tickets_purchased = TicketPurchase.find_by(conference_id: @registration.conference_id)
|
||||||
if @registration.destroy
|
if @registration.destroy
|
||||||
|
ticket_purchase.destory
|
||||||
redirect_to root_path,
|
redirect_to root_path,
|
||||||
notice: "You are not registered for #{@conference.title} anymore!"
|
notice: "You are not registered for #{@conference.title} anymore!"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue