deleting all associated tickets to a user
This commit is contained in:
parent
297b1f8c8a
commit
ac066b0546
1 changed files with 1 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ class ConferenceRegistrationsController < ApplicationController
|
|||
end
|
||||
|
||||
def destroy
|
||||
tickets_purchased = TicketPurchase.find_by(conference_id: @registration.conference_id)
|
||||
tickets_purchased = TicketPurchase.where(conference_id: @registration.conference_id)
|
||||
if @registration.destroy
|
||||
if tickets_purchased
|
||||
tickets_purchased.destroy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue