summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wortschack <mwortschack@gitlab.com>2018-09-18 10:43:19 +0200
committerMartin Wortschack <mwortschack@gitlab.com>2018-09-18 10:43:19 +0200
commit68ac430af9989fe4f93075e5bc426f8e2c55cf3d (patch)
tree52c99b3f7e9b30e4af226fb7cd37262d8d537403
parentcecb0fdd7a0342574c134cd3ed9475debbfa3133 (diff)
downloadgitlab-ce-68ac430af9989fe4f93075e5bc426f8e2c55cf3d.tar.gz
Rename helper method
-rw-r--r--app/helpers/application_helper.rb4
-rw-r--r--app/views/layouts/nav/sidebar/_admin.html.haml4
2 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 7846de9f481..604ddd55ff5 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -13,8 +13,8 @@ module ApplicationHelper
lookup_context.exists?(partial, [], true)
end
- def view_exists?(partial)
- lookup_context.exists?(partial, [], false)
+ def template_exists?(template)
+ lookup_context.exists?(template, [], false)
end
# Check if a particular controller is the current one
diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml
index e4945f46d42..a2636f8179a 100644
--- a/app/views/layouts/nav/sidebar/_admin.html.haml
+++ b/app/views/layouts/nav/sidebar/_admin.html.haml
@@ -218,7 +218,7 @@
= link_to repository_admin_application_settings_path, title: _('Repository') do
%span
= _('Repository')
- - if view_exists?('admin/application_settings/templates')
+ - if template_exists?('admin/application_settings/templates')
= nav_link(path: 'application_settings#templates') do
= link_to templates_admin_application_settings_path, title: _('Templates') do
%span
@@ -239,7 +239,7 @@
= link_to network_admin_application_settings_path, title: _('Network') do
%span
= _('Network')
- - if view_exists?('admin/application_settings/geo')
+ - if template_exists?('admin/application_settings/geo')
= nav_link(path: 'application_settings#geo') do
= link_to geo_admin_application_settings_path, title: _('Geo') do
%span