Method: Megatron::NavigationHelper::Nav#item

Defined in:
app/helpers/megatron/navigation_helper.rb

#item(text, href, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/helpers/megatron/navigation_helper.rb', line 4

def item(text, href, options = {})
  options[:class] = add_class(options[:class], "#{nav_class}-item")
  nav_icon = options.delete(:icon)

  link_up href, options do
    concat nav_icon(nav_icon) unless nav_icon.nil?
    concat ' '
    if options[:link_label] == false
      concat icon_label(text)
    else
      concat link_label(text)
    end
  end
end