Fixed association between TicketPurchase and Payment Model.

One to many association between TicketPurchase model and Payment Model wasn't properly set up.
This commit is contained in:
siddhantbajaj 2017-06-22 18:14:13 +05:30
parent d7678b2fa0
commit 02f27dd4bc

View file

@ -2,6 +2,7 @@ class TicketPurchase < ActiveRecord::Base
belongs_to :ticket
belongs_to :user
belongs_to :conference
belongs_to :payment
validates :ticket_id, :user_id, :conference_id, :quantity, presence: true