Change private statuses index to index without crutches (#26713)
This commit is contained in:
parent
74eb7dbf2d
commit
9e77ab7db2
5 changed files with 21 additions and 47 deletions
|
@ -28,6 +28,7 @@ class Poll < ApplicationRecord
|
|||
|
||||
has_many :votes, class_name: 'PollVote', inverse_of: :poll, dependent: :delete_all
|
||||
has_many :voters, -> { group('accounts.id') }, through: :votes, class_name: 'Account', source: :account
|
||||
has_many :local_voters, -> { group('accounts.id').merge(Account.local) }, through: :votes, class_name: 'Account', source: :account
|
||||
|
||||
has_many :notifications, as: :activity, dependent: :destroy
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue