Sha256: 6a96b35f971287ca150e8d232e9e6444d7e6067ca3ad893eaf81cec60d831886

Contents?: true

Size: 256 Bytes

Versions: 2

Compression:

Stored size: 256 Bytes

Contents

module NavigationHelper
 def nav_link(text, link_path, options = {})
    class_name = current_page?(link_path) ? options.fetch(:class_name, 'active') : ''

    content_tag(:li, class: class_name) do
      link_to text, link_path, options
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bootstrap_toolbelt-0.0.5 app/helpers/navigation_helper.rb
bootstrap_toolbelt-0.0.4 app/helpers/navigation_helper.rb