<commit_before>module ProductsHelper

  # Public: Get the Product categories.
  #
  # curr - The current section (default: 'all').
  #
  # Returns an ActiveSupport::SafeBuffer.
  def product_categories(curr='all')
    list_items = [
      content_tag(:li, link_to('All Bedding', products_path), class: curr == 'all' ? 'active' : ''),
      content_tag(:li, link_to('Boys Bedding', boys_products_path), class: curr == 'boys' ? 'active' : ''),
      content_tag(:li, link_to('Girls Bedding', girls_products_path), class: curr == 'girls' ? 'active' : '')
    ]

    content_tag :ul, class: 'side-nav' do
      list_items.map do |list_item|
        concat(list_item)
      end
    end
  end

  # Public: Get a link to the correct category.
  #
  # product - A Product with 0, 1, or many Tags (optional).
  #
  # Returns an ActiveSupport::SafeBuffer.
  def category_link(product=nil)

    if product.nil? || product.tags.size == 0 || product.tags.size > 1
      url = products_path
      text = 'View All Bedding'
    elsif product.tag_list.include? 'girls'<commit_msg>updates to category links helper<commit_after>module ProductsHelper

  # Public: Get the Product categories.
  #
  # curr - The current section (default: 'all').
  #
  # Returns an ActiveSupport::SafeBuffer.
  def product_categories(curr='all')
    curr = 'all' if curr.blank?

    list_items = [
      content_tag(:li, link_to('All Bedding', products_path), class: curr == 'all' ? 'active' : ''),
      content_tag(:li, link_to('Boys Bedding', boys_products_path), class: curr == 'boys' ? 'active' : ''),
      content_tag(:li, link_to('Girls Bedding', girls_products_path), class: curr == 'girls' ? 'active' : '')
    ]

    content_tag :ul, class: 'side-nav' do
      list_items.map do |list_item|
        concat(list_item)
      end
    end
  end

  # Public: Get a link to the correct category.
  #
  # product - A Product with 0, 1, or many Tags (optional).
  #
  # Returns an ActiveSupport::SafeBuffer.
  def category_link(product=nil)

    if product.nil? || product.tags.size == 0 || product.tags.size > 1
      url = products_path
      text = 'View All Bedding'
    elsif product.tag_list.include? 'girls'
{'fraction_non_alphanumeric': 0.1353211009174312, 'fraction_numerical': 0.003669724770642202, 'mean_word_length': 3.293307086614173, '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': '1439372', 'n_tokens_mistral': 725, 'n_tokens_neox': 712, 'n_words': 193}