Sha256: 00bccb4c53d6b97ae4120e25a97b7cbed04947c7b93abb754f625f34e217ec30
Contents?: true
Size: 671 Bytes
Versions: 9
Compression:
Stored size: 671 Bytes
Contents
# frozen_string_literal: true module Navigator # Navigation helper methods for the view layer. module NavigationHelper # rubocop:disable Metrics/ParameterLists def navigation tag = "ul", attributes: {}, activator: navigation_activator, &block Navigator::Menu.new(self, tag: tag, attributes: attributes, activator: activator, &block) .render .then { |html| raw html } end # rubocop:enable Metrics/ParameterLists module_function def current_path request.env["PATH_INFO"] end def navigation_activator Navigator::TagActivator.new search_value: current_path end end end
Version data entries
9 entries across 9 versions & 1 rubygems