pass paid value as hash, improve code reviews

This commit is contained in:
Rishabh Saxena 2016-07-08 20:24:56 +05:30
parent 8b03f1be74
commit 893f517ab0
7 changed files with 32 additions and 34 deletions

View file

@ -28,8 +28,8 @@ class ConferenceRegistrationsController < ApplicationController
end
def show
@total_price = Ticket.total_price(@conference, current_user, true)
@tickets = current_user.ticket_purchases.where(conference_id: @conference.id)
@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