<commit_before><ol class="breadcrumb">
  <li class="active">
    <%= t('settings.index.title') %>
  </li>
</ol>
<% if @casted_settings && @casted_settings[:errors].any? %>
  <div class="alert alert-danger">
    <%= t('settings.index.settings_include_errors') %>
  </div>
<% else %>
  <% flash.each do |key, value| %>
    <div class="alert alert-<%= key %>"><%= value %></div>
  <% end %>
<% end %>
<%= form_tag [:update_all], method: :put, class: 'form' do %>
  <table class="table table-striped">
    <thead>
      <tr>
        <th>
          <%= t('settings.index.description') %>
        </th>
        <th>
          <%= t('settings.index.value') %>
        </th>
      </tr>
    </thead>
    <tbody>
    <% @settings.each do |name, value| %>
      <% errors = @errors.has_key?(name.to_sym) ? @errors[name.to_sym].join(', ') : nil %>
      <tr data-name="<%= name %>">
        <td>
          <%= I18n.t("settings.attributes.#{name}.name") %>
        </td>
        <td class="setting-value">
          <% setting_with_error = @casted_settings && @casted_settings[:errors].include?(name) %>
          <div class="form-group <%= errors ? 'has-error' : '' %>">
            <%= setting_field(name, value) %>
            <%- if errors.present? %><commit_msg>remove casted settings from view template<commit_after><ol class="breadcrumb">
  <li class="active">
    <%= t('settings.index.title') %>
  </li>
</ol>
<% flash.each do |key, value| %>
  <div class="alert alert-<%= key %>"><%= value %></div>
<% end %>
<%= form_tag [:update_all], method: :put, class: 'form' do %>
  <table class="table table-striped">
    <thead>
      <tr>
        <th>
          <%= t('settings.index.description') %>
        </th>
        <th>
          <%= t('settings.index.value') %>
        </th>
      </tr>
    </thead>
    <tbody>
    <% @settings.each do |name, value| %>
      <% errors = @errors.has_key?(name.to_sym) ? @errors[name.to_sym].join(', ') : nil %>
      <tr data-name="<%= name %>">
        <td>
          <%= I18n.t("settings.attributes.#{name}.name") %>
        </td>
        <td class="setting-value">
          <div class="form-group <%= errors ? 'has-error' : '' %>">
            <%= setting_field(name, value) %>
            <%- if errors.present? %>
{'fraction_non_alphanumeric': 0.2284826974267968, 'fraction_numerical': 0.001774622892635315, 'mean_word_length': 2.4166666666666665, 'pattern_counts': {'":': 0, '<': 82, '<?xml version=': 0, '>': 82, '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': '2974799', 'n_tokens_mistral': 842, 'n_tokens_neox': 770, 'n_words': 144}