use short-form presence validator.

use two-argument form.
add unpaid scope.
repair tests.
This commit is contained in:
Rishabh Saxena 2016-07-08 23:07:17 +05:30
parent 893f517ab0
commit 888c7a8524
6 changed files with 24 additions and 36 deletions

View file

@ -28,7 +28,7 @@ class ConferenceRegistrationsController < ApplicationController
end
def show
@total_price = Ticket.total_price(@conference, current_user, :paid => true)
@total_price = Ticket.total_price(@conference, current_user, paid: true)
@tickets = current_user.ticket_purchases.where(conference_id: @conference.id, paid: true)
@ticket_payments = @tickets.group_by(&:payment_id)
end