0
0
Fork 0

Fix #104 - Style OAuth authorized applications page

Add ability to search accounts by display name
This commit is contained in:
Eugen Rochko 2017-02-27 00:15:00 +01:00
parent 2826e6dada
commit 175a9b9caa
9 changed files with 49 additions and 4 deletions

View file

@ -52,7 +52,7 @@ class Account < ApplicationRecord
# PuSH subscriptions
has_many :subscriptions, dependent: :destroy
pg_search_scope :search_for, against: { username: 'A', domain: 'B' },
pg_search_scope :search_for, against: { display_name: 'A', username: 'B', domain: 'C' },
using: { tsearch: { prefix: true } }
scope :remote, -> { where.not(domain: nil) }