about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-03-13 21:35:43 +0100
committerThibaut Girka <thib@sitedethib.com>2019-03-13 21:35:43 +0100
commit5ffdc5426eb6394ae9e92411a0433aa2dd52d0b0 (patch)
tree6a4c3f86a82261b2d418626ec2b720bc1c09eddb /app/models
parent3005e473a0df4d2ea942dcc33e01c5e4c15b81fa (diff)
parent65d9004ac90209a035e2f103e271986ff8650410 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/models')
-rw-r--r--app/models/poll.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/poll.rb b/app/models/poll.rb
index 09f0b65ec..6df230337 100644
--- a/app/models/poll.rb
+++ b/app/models/poll.rb
@@ -26,6 +26,8 @@ class Poll < ApplicationRecord
 
   has_many :votes, class_name: 'PollVote', inverse_of: :poll, dependent: :destroy
 
+  has_many :notifications, as: :activity, dependent: :destroy
+
   validates :options, presence: true
   validates :expires_at, presence: true, if: :local?
   validates_with PollValidator, on: :create, if: :local?