Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 15:07:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 15:07:48 +0300
commitef31adeb0fb9a02b2c6a4529ec4e38d7082a4b2b (patch)
treef0ee2b8bdffd7f91ad0b31388562c90825179585 /lib/gitlab/application_context.rb
parent7e019504f5ac6decde690565857238e7e59aa034 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/application_context.rb')
-rw-r--r--lib/gitlab/application_context.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/application_context.rb b/lib/gitlab/application_context.rb
index b950bfb0f3a..60a50e97998 100644
--- a/lib/gitlab/application_context.rb
+++ b/lib/gitlab/application_context.rb
@@ -5,13 +5,14 @@ module Gitlab
class ApplicationContext
include Gitlab::Utils::LazyAttributes
- Attribute = Struct.new(:name, :type, :evaluation)
+ Attribute = Struct.new(:name, :type)
APPLICATION_ATTRIBUTES = [
Attribute.new(:project, Project),
Attribute.new(:namespace, Namespace),
Attribute.new(:user, User),
- Attribute.new(:caller_id, String)
+ Attribute.new(:caller_id, String),
+ Attribute.new(:related_class, String)
].freeze
def self.with_context(args, &block)
@@ -39,6 +40,7 @@ module Gitlab
hash[:project] = -> { project_path } if set_values.include?(:project)
hash[:root_namespace] = -> { root_namespace_path } if include_namespace?
hash[:caller_id] = caller_id if set_values.include?(:caller_id)
+ hash[:related_class] = related_class if set_values.include?(:related_class)
end
end