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_pathObject



12
13
14
# File 'app/helpers/navigator/navigation_helper.rb', line 12

def current_path
  request.env["PATH_INFO"]
end


16
17
18
# File 'app/helpers/navigator/navigation_helper.rb', line 16

def navigation_activator
  Navigator::TagActivator.new search_value: current_path
end

Instance Method Details



6
7
8
# File 'app/helpers/navigator/navigation_helper.rb', line 6

def navigation tag = "ul", attributes: {}, activator: navigation_activator, &block
  raw Navigator::Menu.new(self, tag: tag, attributes: attributes, activator: activator, &block).render
end