From 77571b940bf4e570b308562cd5eda094e4a2cb8b Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Mon, 15 Jun 2020 04:34:11 -0700 Subject: [PATCH] HACK!!! Return 0 so the method works. --- app/models/ticket_purchase.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/ticket_purchase.rb b/app/models/ticket_purchase.rb index febe4660..4e554055 100644 --- a/app/models/ticket_purchase.rb +++ b/app/models/ticket_purchase.rb @@ -106,7 +106,7 @@ end def count_purchased_registration_tickets(conference, purchases) # TODO: WHAT CAUSED THIS??? - return unless purcahses + return 0 unless purcahses conference.tickets.for_registration.inject(0) do |sum, registration_ticket| sum + purchases[registration_ticket.id.to_s].to_i end