def nav(type: '', stacked: false, **options, &block)
      nav_class = 'nav'

      if type.blank? || %w(tabs pills).include?(type)
        nav_class << " nav-#{type}"
      else
        raise "Error nav type, must be in tabs and pills."
      end

      nav_class << ' nav-stacked' if stacked

      list(merge_predef_class(nav_class, options), &block)
    end
def nav(type: '', stacked: false, **options, &block)
      nav_class = 'nav'

      if type.blank? || %w(tabs pills).include?(type)
        nav_class << " nav-#{type}"
      else
        raise "Error nav type, must be in tabs and pills."
      end

      nav_class << ' nav-stacked' if stacked

      list(merge_predef_class(nav_class, options), &block)
    end
Button dropdown menus not implemented
 Split button dropdowns not implemented
 Dropup menus not implemented
 Public: Bootstrap navigator that can be used in navbar or used as
         tabs or pills. It wraps the list helper. Generate ul and li tags
         as navigator.

 type       - String. Represent the type of the nav. If it's nil or an
              empty string, the nav would be a common nav, usually be used
              in a navbar. If it's tabs or pills, then the nav has its own
              style. ( default: '' )
 stacked    - Boolean. Shows whether the nav is sorted stacked.
              ( default: false )
 li_options - Default options of all li tag.
 options    - Other options can be accepted by ul.
 block      - The content of a nav.

 Examples

   = nav do |item|
     = item.add(link_to('link 1', '#'))
     = item.add(link_to('link 2', '#'))
     = item.add(link_to('link 3', '#'))
   # => <ul class="nav nav-">
          <li><a href="#">link 1</a></li>
          <li><a href="#">link 2</a></li>
          <li><a href="#">link 3</a></li>
        </ul>

   = nav(type: 'tabs') do |item|
     = item.add(link_to('link 1', '#'))
     = item.add(link_to('link 2', '#'))
     = item.add(link_to('link 3', '#'))
   # => <ul class="nav nav-tabs">
          <li><a href="#">link 1</a></li>
          <li><a href="#">link 2</a></li>
          <li><a href="#">link 3</a></li>
        </ul>

 Returns the whole nav.