UX: Display group fullname in mention autocomplete.

This commit is contained in:
Guo Xiang Tan
2017-01-04 11:39:21 +08:00
parent a89f60b85b
commit 43671b1fda
4 changed files with 17 additions and 26 deletions

View File

@ -568,7 +568,7 @@ class UsersController < ApplicationController
if params[:include_groups] == "true"
to_render[:groups] = Group.search_group(term).map do |m|
{name: m.name, usernames: []}
{ name: m.name, full_name: m.full_name }
end
end
@ -576,7 +576,7 @@ class UsersController < ApplicationController
to_render[:groups] = Group.mentionable(current_user)
.where("name ILIKE :term_like", term_like: "#{term}%")
.map do |m|
{name: m.name, usernames: []}
{ name: m.name, full_name: m.full_name }
end
end