Sha256: 39135f81bd8b2051bbade96ee6eee85abc210c7ad3189ebcc2beb5afc83bdef9
Contents?: true
Size: 517 Bytes
Versions: 2
Compression:
Stored size: 517 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 raw Navigator::Menu.new(self, tag: tag, attributes: attributes, activator: activator, &block).render end 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
navigator-2.1.0 | app/helpers/navigator/navigation_helper.rb |
navigator-2.0.0 | app/helpers/navigator/navigation_helper.rb |