Add vote functionality to tracks
This commit is contained in:
parent
8b2f2b538e
commit
92b09c7de4
18 changed files with 237 additions and 19 deletions
|
|
@ -18,7 +18,7 @@ class Event < ApplicationRecord
|
|||
has_one :submitter_event_user, -> { where(event_role: 'submitter') }, class_name: 'EventUser'
|
||||
has_one :submitter, through: :submitter_event_user, source: :user
|
||||
|
||||
has_many :votes, dependent: :destroy
|
||||
has_many :votes, as: :votable
|
||||
has_many :voters, through: :votes, source: :user
|
||||
has_many :commercials, as: :commercialable, dependent: :destroy
|
||||
has_many :surveys, as: :surveyable, dependent: :destroy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue