Add scope Status.list_eligible_visibility
(#29951)
This commit is contained in:
parent
e6927db2fe
commit
3159c0a547
2 changed files with 4 additions and 3 deletions
|
@ -121,6 +121,7 @@ class Status < ApplicationRecord
|
|||
scope :tagged_with_none, lambda { |tag_ids|
|
||||
where('NOT EXISTS (SELECT * FROM statuses_tags forbidden WHERE forbidden.status_id = statuses.id AND forbidden.tag_id IN (?))', tag_ids)
|
||||
}
|
||||
scope :list_eligible_visibility, -> { where(visibility: %i(public unlisted private)) }
|
||||
|
||||
after_create_commit :trigger_create_webhooks
|
||||
after_update_commit :trigger_update_webhooks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue