<commit_before><%%= form_for @<%= singular_table_name %>, :validate => true do |f| %>
  <%% if @<%= singular_table_name %>.errors.any? %>
    <div id="error_explanation">
      <h2><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>

      <ul>
      <%% @<%= singular_table_name %>.errors.full_messages.each do |msg| %>
        <li><%%= msg %></li>
      <%% end %>
      </ul>
    </div>
  <%% end %>

  <% attributes.each do |attribute| %>
    <%%= f.label :<%= attribute.name %> %><br />
    <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
  <% end %>
  <%%= f.submit %>
<%% end %><commit_msg>add shared/error_messages to templates<commit_after><%%= form_for @<%= singular_table_name %>, :validate => true do |f| %>
  <%%= render 'shared/error_messages', object: f.object %>

  <% attributes.each do |attribute| %>
    <%%= f.label :<%= attribute.name %> %><br />
    <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
  <% end %>
  <%%= f.submit %>
<%% end %>
{'fraction_non_alphanumeric': 0.2514018691588785, 'fraction_numerical': 0.001869158878504673, 'mean_word_length': 3.425619834710744, 'pattern_counts': {'":': 0, '<': 46, '<?xml version=': 0, '>': 48, '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': '7379364', 'n_tokens_mistral': 419, 'n_tokens_neox': 372, 'n_words': 73}