diff options
Diffstat (limited to 'lib/sidebars/context.rb')
-rw-r--r-- | lib/sidebars/context.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sidebars/context.rb b/lib/sidebars/context.rb index d9ac2705aaf..5db05932265 100644 --- a/lib/sidebars/context.rb +++ b/lib/sidebars/context.rb @@ -6,7 +6,7 @@ # values where the logic is in helpers. module Sidebars class Context - attr_reader :current_user, :container + attr_reader :current_user, :container, :route_is_active def initialize(current_user:, container:, **args) @current_user = current_user @@ -16,6 +16,8 @@ module Sidebars singleton_class.public_send(:attr_reader, key) # rubocop:disable GitlabSecurity/PublicSend instance_variable_set("@#{key}", value) end + + @route_is_active ||= ->(_) { false } end end end |