Module: BootstrapHelper
- Defined in:
- lib/trap/helpers/bootstrap_helper.rb
Instance Method Summary collapse
Instance Method Details
#menu_item(name = nil, path = '#', *args, &block) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/trap/helpers/bootstrap_helper.rb', line 2 def (name = nil, path = '#', *args, &block) path = name || path if block_given? = args. [:class] = [[:class], 'nav-link'].join(' ') content_tag :li, class: "nav-item #{is_active?(path, )}" do name, path = path, if block_given? link_to name, path, , &block end end |