improve flash error collection

improve views
This commit is contained in:
Rishabh Saxena 2016-08-11 17:47:52 +05:30
parent 6bd2e5e335
commit 261d7dd0de
4 changed files with 15 additions and 19 deletions

View file

@ -23,6 +23,7 @@ class PaymentsController < ApplicationController
else
@total_amount_to_pay = Ticket.total_price(@conference, current_user, paid: false)
@unpaid_ticket_purchases = current_user.ticket_purchases.unpaid.by_conference(@conference)
flash[:error] = @payment.errors.full_messages.to_sentence + ' Please try again with correct credentials.'
render :new
end
end