add payment model and its associations

This commit is contained in:
Rishabh Saxena 2016-06-18 18:13:29 +05:30
parent e8f1645fc2
commit 36f2cf4373
3 changed files with 77 additions and 0 deletions

View file

@ -38,6 +38,7 @@ class User < ActiveRecord::Base
has_many :registrations, dependent: :destroy
has_many :events_registrations, through: :registrations
has_many :ticket_purchases, dependent: :destroy
has_many :payments, dependent: :destroy
has_many :tickets, through: :ticket_purchases, source: :ticket
has_many :votes, dependent: :destroy
has_many :voted_events, through: :votes, source: :events