diff --git a/app/controllers/ticket_purchases_controller.rb b/app/controllers/ticket_purchases_controller.rb index 60ea5b98..83c53ad0 100644 --- a/app/controllers/ticket_purchases_controller.rb +++ b/app/controllers/ticket_purchases_controller.rb @@ -41,15 +41,15 @@ class TicketPurchasesController < ApplicationController if @conference.registration_ticket_required? && count_registration_tickets_after == 0 redirect_to conference_tickets_path(@conference.short_title), error: 'Please get at least one registration ticket to continue.' - return + return end # Current user didn't have a registration ticket and is purchasing one if count_registration_tickets_before == 0 && count_registration_tickets_after == 1 redirect_to new_conference_conference_registration_path(@conference.short_title) - else + else redirect_to conference_physical_tickets_path - end + end end def index diff --git a/app/models/ticket_purchase.rb b/app/models/ticket_purchase.rb index 74266d91..46a5befe 100644 --- a/app/models/ticket_purchase.rb +++ b/app/models/ticket_purchase.rb @@ -110,11 +110,6 @@ class TicketPurchase < ApplicationRecord errors.add(:quantity, 'cannot be greater than one for registration tickets.') end end - - # def has_registration_ticket_for?(conference) - # # BUG: ticket_purchase has only one ticket? - # ticket.try(:registration_ticket?) - # end end private