This commit is contained in:
Chashmeet Singh 2017-04-18 06:42:38 +00:00 committed by GitHub
commit e6ba8d4a43

View file

@ -83,7 +83,9 @@ class ConferenceRegistrationsController < ApplicationController
end
def destroy
tickets_purchased = TicketPurchase.find_by(conference_id: @registration.conference_id)
if @registration.destroy
ticket_purchase.destory
redirect_to root_path,
notice: "You are not registered for #{@conference.title} anymore!"
else