summaryrefslogtreecommitdiff
path: root/lib/banzai/filter/user_reference_filter.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-02-13 13:26:33 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-02-13 22:30:10 +0200
commit2c55fd0019ea9ac33e310151a61892fada42d5a2 (patch)
treea658277ef7bea4390d8856755251be72b53b697f /lib/banzai/filter/user_reference_filter.rb
parente5f446b7ca4bc54ffaf527e4c57dea2bee2f79f6 (diff)
downloadgitlab-ce-2c55fd0019ea9ac33e310151a61892fada42d5a2.tar.gz
Add GFM support to nested groupsdz-nested-groups-gfm-alt
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/banzai/filter/user_reference_filter.rb')
-rw-r--r--lib/banzai/filter/user_reference_filter.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/banzai/filter/user_reference_filter.rb b/lib/banzai/filter/user_reference_filter.rb
index 1aa9355b256..c973897f420 100644
--- a/lib/banzai/filter/user_reference_filter.rb
+++ b/lib/banzai/filter/user_reference_filter.rb
@@ -75,8 +75,8 @@ module Banzai
# corresponding Namespace objects.
def namespaces
@namespaces ||=
- Namespace.where(path: usernames).each_with_object({}) do |row, hash|
- hash[row.path] = row
+ Namespace.where_full_path_in(usernames).each_with_object({}) do |row, hash|
+ hash[row.full_path] = row
end
end
@@ -122,7 +122,7 @@ module Banzai
def link_to_namespace(namespace, link_content: nil)
if namespace.is_a?(Group)
- link_to_group(namespace.path, namespace, link_content: link_content)
+ link_to_group(namespace.full_path, namespace, link_content: link_content)
else
link_to_user(namespace.path, namespace, link_content: link_content)
end