diff --git a/app/controllers/conference_registrations_controller.rb b/app/controllers/conference_registrations_controller.rb index 34a1effd..fd4a2938 100644 --- a/app/controllers/conference_registrations_controller.rb +++ b/app/controllers/conference_registrations_controller.rb @@ -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