diff options
author | nullkal <nullkal@nil.nu> | 2017-09-13 19:30:07 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-09-13 12:30:07 +0200 |
commit | da77f65c4684a8a9ee25c3e18f6f09824c765c2d (patch) | |
tree | e006c2dbdebdb23d55c4b2e57ff66c7585fb0215 /app/models/account.rb | |
parent | 9e2ff3ef71e917ba88a9062814f3e828f9199009 (diff) |
Add instance search feature (#4925)
Diffstat (limited to 'app/models/account.rb')
-rw-r--r-- | app/models/account.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 864b3cb6e..f175c7081 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -104,6 +104,7 @@ class Account < ApplicationRecord scope :by_domain_accounts, -> { group(:domain).select(:domain, 'COUNT(*) AS accounts_count').order('accounts_count desc') } scope :matches_username, ->(value) { where(arel_table[:username].matches("#{value}%")) } scope :matches_display_name, ->(value) { where(arel_table[:display_name].matches("#{value}%")) } + scope :matches_domain, ->(value) { where(arel_table[:domain].matches("%#{value}%")) } delegate :email, :current_sign_in_ip, |