diff options
author | Reverite <github@reverite.sh> | 2019-06-26 20:31:07 -0700 |
---|---|---|
committer | Reverite <github@reverite.sh> | 2019-06-26 20:31:07 -0700 |
commit | 3fa90982efda2109ddf90d81f5ed3449f8282642 (patch) | |
tree | e5514f4c72c9ffb44059a2afb7fdf24d0348bbd4 /app/models/custom_emoji.rb | |
parent | 714940de498e93a8bf40dcda1835217df18741bf (diff) | |
parent | 9ef25877dfda12cf31ec586294e4d4908f5be4f0 (diff) |
Merge branch 'glitch' into production
Diffstat (limited to 'app/models/custom_emoji.rb')
-rw-r--r-- | app/models/custom_emoji.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/custom_emoji.rb b/app/models/custom_emoji.rb index d3cc70504..e73cd9bd2 100644 --- a/app/models/custom_emoji.rb +++ b/app/models/custom_emoji.rb @@ -39,6 +39,7 @@ class CustomEmoji < ApplicationRecord scope :local, -> { where(domain: nil) } scope :remote, -> { where.not(domain: nil) } scope :alphabetic, -> { order(domain: :asc, shortcode: :asc) } + scope :by_domain_and_subdomains, ->(domain) { where(domain: domain).or(where(arel_table[:domain].matches('%.' + domain))) } remotable_attachment :image, LIMIT |