Module: Navigator::NavigationHelper
- Defined in:
- app/helpers/navigator/navigation_helper.rb
Overview
Navigation helper methods for the view layer.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.current_path ⇒ Object
12 13 14 |
# File 'app/helpers/navigator/navigation_helper.rb', line 12 def current_path request.env["PATH_INFO"] end |
.navigation_activator ⇒ Object
16 17 18 |
# File 'app/helpers/navigator/navigation_helper.rb', line 16 def Navigator::TagActivator.new search_value: current_path end |
Instance Method Details
#navigation(tag = "ul", attributes: {}, activator: navigation_activator, &block) ⇒ Object
6 7 8 |
# File 'app/helpers/navigator/navigation_helper.rb', line 6 def tag = "ul", attributes: {}, activator: , &block raw Navigator::Menu.new(self, tag: tag, attributes: attributes, activator: activator, &block).render end |