Skip to content

Commit

Permalink
Fix scope
Browse files Browse the repository at this point in the history
  • Loading branch information
prplecake committed Sep 24, 2024
1 parent ed9bbd1 commit 06713f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/custom_emoji.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down

0 comments on commit 06713f1

Please sign in to comment.