Improve Registration Flow Some:
* Trying to register when a ticket is required will now redirect you to buy tickets. * #64 will then redirect you back to complete the registration
This commit is contained in:
parent
62dd99b263
commit
d4a2861051
3 changed files with 7 additions and 3 deletions
|
|
@ -84,7 +84,8 @@ class Registration < ApplicationRecord
|
|||
end
|
||||
|
||||
def user_has_registration_ticket
|
||||
return if TicketPurchase.where(user: user, ticket: conference.registration_tickets).paid.any?
|
||||
return if conference.registration_ticket_required? &&
|
||||
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?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue