about summary refs log tree commit diff
path: root/app/models/poll.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-03-13 23:44:37 +0100
committerGitHub <noreply@github.com>2019-03-13 23:44:37 +0100
commitfa75324059c7a146354470691888dc0e1de0342f (patch)
tree2f4a582a05b6ef7b001140871bf2e2bea7771d95 /app/models/poll.rb
parent3005e473a0df4d2ea942dcc33e01c5e4c15b81fa (diff)
parent931ecc8824e81c4dcaeb900290c09145b4ed7351 (diff)
Merge pull request #958 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/models/poll.rb')
-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?