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

@ -13,7 +13,10 @@ class TicketPurchase < ActiveRecord::Base
delegate :price_cents, to: :ticket
delegate :price_currency, to: :ticket
scope :paid, -> { where(paid: true) }
scope :unpaid, -> { where(paid: false) }
scope :by_conference, -> (conference) { where(conference_id: conference.id) }
scope :by_user, -> (user) { where(user_id: user.id) }
def self.purchase(conference, user, purchases)
errors = []