<commit_before><% object = form.object %>
<% if (categories = @site.categories.of_type(object.class.to_s)).present? %>
  <%= form.simple_field t('.label'), nil, :class => 'categories' do %>
    <% categories.each do |category| %>
      <%= hidden_field_tag "#{object.class.to_s.demodulize.downcase}[category_ids][#{category.id}]", 0, :id => nil %>
      <label>
        <%= check_box_tag "#{object.class.to_s.demodulize.downcase}[category_ids][#{category.id}]", 1, object.categories.member?(category), :id => nil %>
        <%= category.label %>
      </label>
    <% end %>
  <% end %>
<% end %><commit_msg>Categories work for camelcased resources<commit_after><% object = form.object %>
<% if (categories = @site.categories.of_type(object.class.to_s)).present? %>
  <%= form.simple_field t('.label'), nil, :class => 'categories' do %>
    <% categories.each do |category| %>
      <%= hidden_field_tag "#{object.class.to_s.demodulize.underscore.downcase}[category_ids][#{category.id}]", 0, :id => nil %>
      <label>
        <%= check_box_tag "#{object.class.to_s.demodulize.underscore.downcase}[category_ids][#{category.id}]", 1, object.categories.member?(category), :id => nil %>
        <%= category.label %>
      </label>
    <% end %>
  <% end %>
<% end %>

{'fraction_non_alphanumeric': 0.21169036334913113, 'fraction_numerical': 0.00315955766192733, 'mean_word_length': 3.94921875, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 33, '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': '2392621', 'n_tokens_mistral': 465, 'n_tokens_neox': 425, 'n_words': 68}