solve code reviews, resolve rebase conflicts

This commit is contained in:
Rishabh Saxena 2016-07-14 19:10:33 +05:30
parent 9b704e483e
commit ae44abc7e6
10 changed files with 32 additions and 45 deletions

View file

@ -7,7 +7,7 @@ class TicketPurchasesController < ApplicationController
TicketPurchase.destroy_all(user_id: current_user.id, conference_id: @conference.id, paid: false)
message = TicketPurchase.purchase(@conference, current_user, params[:tickets][0])
if message.blank?
if current_user.ticket_purchases.unpaid.any?
if current_user.ticket_purchases.by_conference(@conference).unpaid.any?
redirect_to new_conference_payment_path, notice: 'Please pay here to purchase tickets.'
else
redirect_to conference_conference_registration_path(@conference.short_title)