controller/ticket_purchase: rubocop fix

This commit is contained in:
Rishabh Saxena 2016-08-22 13:09:02 +05:30
parent b36d4e98e2
commit a6f7516eae
No known key found for this signature in database
GPG key ID: FA3BDC38A9CB6807

View file

@ -10,14 +10,12 @@ class TicketPurchasesController < ApplicationController
if current_user.ticket_purchases.by_conference(@conference).unpaid.any?
redirect_to new_conference_payment_path,
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
if 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
redirect_to conference_tickets_path(@conference.short_title),
error: 'Please get at least one ticket to continue.'
end
redirect_to conference_tickets_path(@conference.short_title),
error: 'Please get at least one ticket to continue.'
end
else
redirect_to conference_conference_registration_path(@conference.short_title),