Adds dependent restricted association to some models

fix #348
This commit is contained in:
chrisbr 2014-12-18 13:38:40 +01:00
parent 87b1aba1e9
commit 799fd0c3a4
19 changed files with 65 additions and 66 deletions

View file

@ -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