add payment model and its associations

This commit is contained in:
Rishabh Saxena 2016-07-27 19:27:39 +05:30
parent b639d2eec5
commit ee0a575a6f
3 changed files with 29 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