<commit_before>module NavigationHelper

  def link_helper(link_title, path, class_name)
    link_to link_title, path, class: class_name
  end

  def all_categories
    @categories ||= Category.all
  end

  def product_category_index_dropdown
    content_tag(:div, :class => 'dropdown-menu') do 
      all_categories.collect do |category|
        classTitle = category.name.parameterize('_')

        content_tag(:a, category.name, {class: "#{ classTitle } dropdown-item", href: "/categories/#{ category.id }/products", id: category.id})
      end.join.html_safe
    end
  end

  def nav_link_helper(name, path, method = :get)
    content_tag(:li, class: 'nav-item') do 
      link_to name, path, method: method, class: 'nav-link'
    end
  end<commit_msg>I added an id to the nav helper function<commit_after>module NavigationHelper

  def link_helper(link_title, path, class_name)
    link_to link_title, path, class: class_name
  end

  def all_categories
    @categories ||= Category.all
  end

  def product_category_index_dropdown
    content_tag(:div, :class => 'dropdown-menu') do 
      all_categories.collect do |category|
        classTitle = category.name.parameterize('_')

        content_tag(:a, category.name, {class: "#{ classTitle } dropdown-item", href: "/categories/#{ category.id }/products", id: category.id})
      end.join.html_safe
    end
  end

  def nav_link_helper(name, path, method = :get)
    content_tag(:li, class: 'nav-item') do 
      link_to name, path, method: method, class: 'nav-link', id: name.underscore
    end
  end
{'fraction_non_alphanumeric': 0.11489088575096278, 'fraction_numerical': 0.0, 'mean_word_length': 3.6398809523809526, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '341274', 'n_tokens_mistral': 504, 'n_tokens_neox': 484, 'n_words': 129}