<commit_before><script>change_inspection_contract();</script>

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

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

  <div class="field">
    <%= f.label :system_model_id %><br>
    <%= f.collection_select(:system_model_id, SystemModel.all, :id, :name, :include_blank => true) %>
  </div>
  <div class="field">
    <%= f.label :serial_number %><br>
    <%= f.text_field :serial_number, disabled: !@equipment.new_record? %>
  </div>
  <div class="field">
    <%= f.label :inspection_contract %><commit_msg>system_model can't change when update...<commit_after><script>change_inspection_contract();</script>

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

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

  <div class="field">
    <%= f.label :system_model_id %><br>
    <%= f.collection_select(:system_model_id, SystemModel.all, :id, :name, { :include_blank => true }, { :disabled => !@equipment.new_record? }) %>
  </div>
  <div class="field">
    <%= f.label :serial_number %><br>
    <%= f.text_field :serial_number, disabled: !@equipment.new_record? %>
  </div>
  <div class="field">
    <%= f.label :inspection_contract %>
{'fraction_non_alphanumeric': 0.203843913803145, 'fraction_numerical': 0.0023296447291788003, 'mean_word_length': 3.6432432432432433, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 64, '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': '4492892', 'n_tokens_mistral': 657, 'n_tokens_neox': 595, 'n_words': 114}