summaryrefslogtreecommitdiff
path: root/app/helpers/gitlab_routing_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/gitlab_routing_helper.rb')
-rw-r--r--app/helpers/gitlab_routing_helper.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers/gitlab_routing_helper.rb b/app/helpers/gitlab_routing_helper.rb
index b5f4bbe97dc..d03b0264a78 100644
--- a/app/helpers/gitlab_routing_helper.rb
+++ b/app/helpers/gitlab_routing_helper.rb
@@ -2,6 +2,16 @@
module GitlabRoutingHelper
extend ActiveSupport::Concern
+ def self.require_gitlab_routing(mod = nil)
+ @require_gitlab_routing ||= []
+
+ if mod
+ @require_gitlab_routing << mod
+ else
+ @require_gitlab_routing
+ end
+ end
+
# Project
def project_tree_path(project, ref = nil, *args)
namespace_project_tree_path(project.namespace, project, ref || @ref || project.repository.root_ref, *args) # rubocop:disable Cop/ProjectPathHelper