mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: Group.search
should look up Group#full_name
too.
https://meta.discourse.org/t/mentioning-group-by-full-name-doesnt-work/63437/3
This commit is contained in:
parent
7b35c55a1e
commit
5e156fbe85
2 changed files with 17 additions and 1 deletions
|
@ -282,7 +282,9 @@ class Group < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def self.search_group(name)
|
||||
Group.where(visible: true).where("name ILIKE :term_like", term_like: "#{name}%")
|
||||
Group.where(visible: true).where(
|
||||
"name ILIKE :term_like OR full_name ILIKE :term_like", term_like: "#{name}%"
|
||||
)
|
||||
end
|
||||
|
||||
def self.lookup_group(name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue