module ApplicationHelper
end

module ApplicationHelper
  def nav_link(text, link)
    recognized = Rails.application.routes.recognize_path(link)
    if recognized[:controller] == params[:controller] && recognized[:action] == params[:action]
      content_tag(:li, :class => "active") do
        link_to(text, link)
      end
    else
      content_tag(:li) do
        link_to(text, link)
      end
    end
  end
end

Create a helper to manage header links
Create a helper to manage header links

In the cases where we have a recognised path and are currently on it,
show it as active.
