change rails initialisation.
repair abilities. add ticket purchasing check.
This commit is contained in:
parent
72ef33cbe6
commit
a9ab1186f8
9 changed files with 14 additions and 14 deletions
|
|
@ -8,9 +8,11 @@ class TicketPurchasesController < ApplicationController
|
|||
message = TicketPurchase.purchase(@conference, current_user, params[:tickets][0])
|
||||
if message.blank?
|
||||
if current_user.ticket_purchases.by_conference(@conference).unpaid.any?
|
||||
redirect_to new_conference_payment_path, notice: 'Please pay here to purchase tickets.'
|
||||
redirect_to new_conference_payment_path,
|
||||
notice: 'Please pay here to purchase tickets.'
|
||||
else
|
||||
redirect_to conference_conference_registration_path(@conference.short_title)
|
||||
redirect_to conference_tickets_path(@conference.short_title),
|
||||
error: 'Please purchase atleast one ticket to continue.'
|
||||
end
|
||||
else
|
||||
redirect_to conference_conference_registration_path(@conference.short_title),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue