parent
87b1aba1e9
commit
799fd0c3a4
19 changed files with 65 additions and 66 deletions
|
|
@ -38,7 +38,7 @@ class User < ActiveRecord::Base
|
|||
has_many :event_users, dependent: :destroy
|
||||
has_many :events, -> { uniq }, through: :event_users
|
||||
has_many :registrations, dependent: :destroy
|
||||
has_many :ticket_purchases
|
||||
has_many :ticket_purchases, dependent: :destroy
|
||||
has_many :tickets, through: :ticket_purchases, source: :ticket
|
||||
has_many :votes, dependent: :destroy
|
||||
has_many :voted_events, through: :votes, source: :events
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue