diff options
Diffstat (limited to 'app/models/poll.rb')
-rw-r--r-- | app/models/poll.rb | 2 |
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? |