mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-27 02:24:03 -05:00
Fix scope
This commit is contained in:
parent
ed9bbd1fc3
commit
06713f11f4
@ -53,7 +53,7 @@ class CustomEmoji < ApplicationRecord
|
||||
scope :local, -> { where(domain: nil) }
|
||||
scope :remote, -> { where.not(domain: nil) }
|
||||
scope :enabled, -> { where(disabled: false) }
|
||||
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.enabled.where(visible_in_picker: true) }
|
||||
|
Loading…
Reference in New Issue
Block a user