controller/ticket_purchase: rubocop fix
This commit is contained in:
parent
b36d4e98e2
commit
a6f7516eae
1 changed files with 5 additions and 7 deletions
|
|
@ -10,14 +10,12 @@ class TicketPurchasesController < ApplicationController
|
||||||
if current_user.ticket_purchases.by_conference(@conference).unpaid.any?
|
if current_user.ticket_purchases.by_conference(@conference).unpaid.any?
|
||||||
redirect_to new_conference_payment_path,
|
redirect_to new_conference_payment_path,
|
||||||
notice: 'Please pay here to get tickets.'
|
notice: 'Please pay here to get tickets.'
|
||||||
|
elsif current_user.ticket_purchases.by_conference(@conference).paid.any?
|
||||||
|
redirect_to conference_conference_registration_path(@conference.short_title),
|
||||||
|
notice: 'You have free tickets for the conference.'
|
||||||
else
|
else
|
||||||
if current_user.ticket_purchases.by_conference(@conference).paid.any?
|
redirect_to conference_tickets_path(@conference.short_title),
|
||||||
redirect_to conference_conference_registration_path(@conference.short_title),
|
error: 'Please get at least one ticket to continue.'
|
||||||
notice: 'You have free tickets for the conference.'
|
|
||||||
else
|
|
||||||
redirect_to conference_tickets_path(@conference.short_title),
|
|
||||||
error: 'Please get at least one ticket to continue.'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
redirect_to conference_conference_registration_path(@conference.short_title),
|
redirect_to conference_conference_registration_path(@conference.short_title),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue