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:
parent
d7678b2fa0
commit
02f27dd4bc
1 changed files with 1 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ class TicketPurchase < ActiveRecord::Base
|
||||||
belongs_to :ticket
|
belongs_to :ticket
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :conference
|
belongs_to :conference
|
||||||
|
belongs_to :payment
|
||||||
|
|
||||||
validates :ticket_id, :user_id, :conference_id, :quantity, presence: true
|
validates :ticket_id, :user_id, :conference_id, :quantity, presence: true
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue