add ability to create and purchase free tickets
This commit is contained in:
parent
c4938166f5
commit
4dcfc55418
2 changed files with 16 additions and 6 deletions
|
|
@ -13,7 +13,7 @@ class Ticket < ActiveRecord::Base
|
|||
|
||||
validates :price_cents, :price_currency, :title, presence: true
|
||||
|
||||
validates_numericality_of :price_cents, greater_than: 0
|
||||
validates_numericality_of :price_cents, greater_than_or_equal_to: 0
|
||||
|
||||
def bought?(user)
|
||||
buyers.include?(user)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue