Sha256: f45c2cac7bd5274d63bdb7e1dc1a81195a982143e5a6a03fc087fec3fa8fd357
Contents?: true
Size: 534 Bytes
Versions: 11
Compression:
Stored size: 534 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:, attributes:, 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
11 entries across 11 versions & 1 rubygems