diff --git a/app/controllers/ticket_purchases_controller.rb b/app/controllers/ticket_purchases_controller.rb index 90b0c484..60ea5b98 100644 --- a/app/controllers/ticket_purchases_controller.rb +++ b/app/controllers/ticket_purchases_controller.rb @@ -47,7 +47,6 @@ class TicketPurchasesController < ApplicationController # 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 redirect_to conference_physical_tickets_path end diff --git a/app/models/user.rb b/app/models/user.rb index d5281b8e..bb68fc0d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -348,7 +348,7 @@ class User < ApplicationRecord def count_registration_tickets(conference) count = 0 - for ticket_purchase in current_user.ticket_purchases.by_conference(@conference) + for ticket_purchase in ticket_purchases.by_conference(conference) for physical_ticket in ticket_purchase.physical_tickets if physical_ticket.ticket.registration_ticket count += 1