Fix scope

pull/1846/head
prplecake 2022-09-29 15:49:55 -05:00
parent fba627755e
commit 726a61e725
No known key found for this signature in database
GPG Key ID: 5C3C6C19379A53AC
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ class CustomEmoji < ApplicationRecord
scope :local, -> { where(domain: nil) }
scope :remote, -> { where.not(domain: nil) }
scope :remote_only, -> { where.not(domain: nil).where(category_id: nil) }
scope :remote_only, -> { where.not(domain: nil).where(category_id: nil).where(local_counterpart: { id: nil }) }
scope :alphabetic, -> { order(domain: :asc, shortcode: :asc) }
scope :by_domain_and_subdomains, ->(domain) { where(domain: domain).or(where(arel_table[:domain].matches("%.#{domain}"))) }
scope :listed, -> { local.where(disabled: false).where(visible_in_picker: true) }