<commit_before><%% form_for(@<%= singular_name %>) do |f| %>
  <%%= f.error_messages %>

  <fieldset>
    <legend><%%= t('<%= singular_name %>', :count => 1).humanize %></legend>

<% for attribute in attributes -%>
    <div>
      <%%= f.label :<%= attribute.name %>, t('<%= "attribute.#{attribute.column.name}" %>') %>
<% if attribute.name =~ /_id\Z/ -%>
<%
  association = attribute.name.sub(/_id\Z/, '')
  label_attribute = association.camelize.constantize.column_names.include?('name') ? 'name' : 'id'
-%>
      <%%= f.collection_select :<%= attribute.name %>, @<%= association.pluralize %>, :id, :<%= label_attribute %>,
        {:prompt => t('select_prompt')} %>
<% else -%>
      <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
<% end -%>
    </div>
<% end -%>

    <hr />
    <%%= f.submit t('save') %>
  </fieldset>
<%% end %>

<commit_msg>Use text field for date selection<commit_after><%% form_for(@<%= singular_name %>) do |f| %>
  <%%= f.error_messages %>

  <fieldset>
    <legend><%%= t('<%= singular_name %>', :count => 1).humanize %></legend>

<% for attribute in attributes -%>
    <div>
      <%%= f.label :<%= attribute.name %>, t('<%= "attribute.#{attribute.column.name}" %>') %>
<% if attribute.name =~ /_id\Z/ -%>
<%
  association = attribute.name.sub(/_id\Z/, '')
  label_attribute = association.camelize.constantize.column_names.include?('name') ? 'name' : 'id'
-%>
      <%%= f.collection_select :<%= attribute.name %>, @<%= association.pluralize %>, :id, :<%= label_attribute %>,
        {:prompt => t('select_prompt')} %>
<% elsif attribute.field_type == :date_select -%>
      <%%= f.text_field :<%= attribute.name %> %>
<% else -%>
      <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
<% end -%>
    </div>
<% end -%>

    <hr />
    <%%= f.submit t('save') %>
  </fieldset>
<%% end %>


{'fraction_non_alphanumeric': 0.267353579175705, 'fraction_numerical': 0.0010845986984815619, 'mean_word_length': 3.4138755980861246, 'pattern_counts': {'":': 0, '<': 66, '<?xml version=': 0, '>': 70, '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': '3433513', 'n_tokens_mistral': 737, 'n_tokens_neox': 672, 'n_words': 110}