Weigh username matches higher than domain matches in account search

remotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
Eugen Rochko 2016-11-12 14:56:40 +01:00
parent afded319d2
commit 20aa777c58
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class Account < ApplicationRecord
has_many :media_attachments, dependent: :destroy
pg_search_scope :search_for, against: %i(username domain), using: { tsearch: { prefix: true } }
pg_search_scope :search_for, against: { username: 'A', domain: 'B' }, using: { tsearch: { prefix: true } }
scope :remote, -> { where.not(domain: nil) }
scope :local, -> { where(domain: nil) }