use short-form presence validator.
use two-argument form. add unpaid scope. repair tests.
This commit is contained in:
parent
893f517ab0
commit
888c7a8524
6 changed files with 24 additions and 36 deletions
|
|
@ -13,6 +13,8 @@ class TicketPurchase < ActiveRecord::Base
|
|||
delegate :price_cents, to: :ticket
|
||||
delegate :price_currency, to: :ticket
|
||||
|
||||
scope :unpaid, -> { where(paid: false) }
|
||||
|
||||
def self.purchase(conference, user, purchases)
|
||||
errors = []
|
||||
ActiveRecord::Base.transaction do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue