<commit_before><!-- Use a form builder, provided by a Helper Method form_for to create a form -->
<%= form_for @resource do |f| %>
  
  <!-- We check if there are any errors, with @resources.errors.any?  -->
  <% if @resource.errors.any? %>
    <div id="error_explanation">
      <h2>
        <%= pluralize(@resource.errors.count, "error") %> prohibited
        this article from being saved:
      </h2>
      <ul>
        <!-- Show a list of errors -->
        <% @resource.errors.full_messages.each do |msg| %>
          <li><%= msg %></li>
        <% end %>
      </ul>
    </div>
  <% end %>
 
  <p>
    <%= f.label :title %><br>
    <%= f.text_field :title %>
  </p>
 
  <p>
    <%= f.label :link %><br>
    <%= f.text_area :link %>
  </p>
 
  <p>
    <%= f.submit %>
  </p>
 
<% end %><commit_msg>changed wording of error notice and add check boxes for topic names<commit_after><!-- Use a form builder, provided by a Helper Method form_for to create a form -->
<%= form_for @resource do |f| %>
  
  <!-- We check if there are any errors, with @resources.errors.any?  -->
  <% if @resource.errors.any? %>
    <div id="error_explanation">
      <h2>
        <%= pluralize(@resource.errors.count, "error") %> prohibited
        this resource from being saved:
      </h2>
      <ul>
        <!-- Show a list of errors -->
        <% @resource.errors.full_messages.each do |msg| %>
          <li><%= msg %></li>
        <% end %>
      </ul>
    </div>
  <% end %>
 
  <p>
    <%= f.label :title %><br>
    <%= f.text_field :title %>
  </p>
 
  <p>
    <%= f.label :link %><br>
    <%= f.text_area :link %>
  </p>



  <h3>Associate your resource with a Learn Topic:</h3>

    <%= f.collection_check_boxes :topic_ids, Topic.all, :id, :name %><br>

  <div class="actions">
    <p><%= f.submit %></p>
  </div>

<% end %>
{'fraction_non_alphanumeric': 0.19494783086216363, 'fraction_numerical': 0.0032948929159802307, 'mean_word_length': 2.1797556719022686, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 73, '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': '345270', 'n_tokens_mistral': 697, 'n_tokens_neox': 630, 'n_words': 179}