summaryrefslogtreecommitdiff
path: root/lib/banzai
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
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')
-rw-r--r--lib/banzai/filter/abstract_reference_filter.rb2
-rw-r--r--lib/banzai/filter/user_reference_filter.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/banzai/filter/abstract_reference_filter.rb b/lib/banzai/filter/abstract_reference_filter.rb
index a3d495a5da0..955d857c679 100644
--- a/lib/banzai/filter/abstract_reference_filter.rb
+++ b/lib/banzai/filter/abstract_reference_filter.rb
@@ -285,7 +285,7 @@ module Banzai
end
def current_project_namespace_path
- @current_project_namespace_path ||= project.namespace.path
+ @current_project_namespace_path ||= project.namespace.full_path
end
private
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