Skip to content

Commit 8faca90

Browse files
authored
Merge pull request #10705 from neinteractiveliterature/fix-dropping-events-with-signup-requests
Destroy ranked choices when destroying runs
2 parents 5f94091 + b7e29f2 commit 8faca90

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

app/models/run.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@
2929

3030
class Run < ApplicationRecord
3131
belongs_to :event
32-
belongs_to :updated_by, class_name: 'User', optional: true
32+
belongs_to :updated_by, class_name: "User", optional: true
3333
has_many :signups, dependent: :destroy
3434
has_many :signup_changes, dependent: :destroy
35-
has_many :signup_requests, foreign_key: 'target_run_id', dependent: :destroy
35+
has_many :signup_ranked_choices, foreign_key: "target_run_id", dependent: :destroy
36+
has_many :signup_requests, foreign_key: "target_run_id", dependent: :destroy
3637
has_many :ticket_types, through: :event
3738
has_many :tickets, dependent: :destroy
3839
has_and_belongs_to_many :rooms

0 commit comments

Comments
 (0)