tidying up
This commit is contained in:
parent
8195426c2c
commit
61be84a7f9
2 changed files with 2 additions and 1 deletions
|
|
@ -70,6 +70,7 @@ class Registration < ApplicationRecord
|
|||
|
||||
def user_has_registration_ticket
|
||||
return if TicketPurchase.where(user: user, ticket: conference.registration_tickets).paid.any?
|
||||
|
||||
errors.add(:base, 'You must purchase a registration ticket before registering')
|
||||
if TicketPurchase.where(user: user, ticket: conference.registration_tickets).unpaid.any?
|
||||
errors.add(:base, 'You currently have a ticket with an unfinished purchase')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue