Merge pull request #1118 from rishabhs95/free-ticket

ability to create and purchase free tickets
This commit is contained in:
Hernán Schmidt 2017-01-31 14:54:18 +01:00 committed by GitHub
commit a4ef10cf1b
9 changed files with 88 additions and 24 deletions

View file

@ -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)