<commit_before>module ShelvesHelper
  def library_shelf_facet(current_library, facet)
    library = Library.where(name: facet.value).select([:name, :display_name]).first
    return nil unless library
    current = true if current_library.try(:name) == library.name
    content_tag :li do
      if current
        content_tag :strong do
          link_to("#{library.display_name.localize} (" + facet.count.to_s + ")", url_for(params.permit.merge(page: nil, library_id: library.name, only_path: true)))
        end
      else
        link_to("#{library.display_name.localize} (" + facet.count.to_s + ")", url_for(params.permit.merge(page: nil, library_id: library.name, only_path: true)))
      end
    end
  end
end
<commit_msg>fix filtering params<commit_after>module ShelvesHelper
  def library_shelf_facet(current_library, facet)
    library = Library.where(name: facet.value).select([:name, :display_name]).first
    return nil unless library
    current = true if current_library.try(:name) == library.name
    content_tag :li do
      if current
        content_tag :strong do
          link_to("#{library.display_name.localize} (" + facet.count.to_s + ")", url_for(filtered_params.merge(page: nil, library_id: library.name, only_path: true)))
        end
      else
        link_to("#{library.display_name.localize} (" + facet.count.to_s + ")", url_for(filtered_params.merge(page: nil, library_id: library.name, only_path: true)))
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.12286689419795221, 'fraction_numerical': 0.0, 'mean_word_length': 3.7138263665594855, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5190155', 'n_tokens_mistral': 474, 'n_tokens_neox': 460, 'n_words': 98}