diff options
author | ThibG <thib@sitedethib.com> | 2019-06-25 22:43:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-25 22:43:33 +0200 |
commit | ed10ae2693e83ac7fbac7273b2cf2ca424aca0c4 (patch) | |
tree | a9bc878edcd521969d50fcc54fcc30f7b2ca54b5 /app/models/custom_emoji.rb | |
parent | 38d28824475056766c97385b66f4e04a5123e3a2 (diff) | |
parent | 81bf43cfdd0d31ee4564a1399ce7fbe07eb04bb3 (diff) |
Merge pull request #1138 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
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 |