Sha256: ffea390a16e14c0ad7a6b048803274f9eca487a6d7a8b25d75bdbdcc0a990e82
Contents?: true
Size: 559 Bytes
Versions: 1
Compression:
Stored size: 559 Bytes
Contents
# frozen_string_literal: true module Navigator # Navigation helper methods for the view layer. module NavigationHelper 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 module_function def current_path = request.env["PATH_INFO"] def navigation_activator = Navigator::TagActivator.new(search_value: current_path) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
navigator-6.2.0 | app/helpers/navigator/navigation_helper.rb |