<commit_before>// this changes the parts of the form that need to be changed so it converts it to a patch action (POST)
<% form_id = unique_form_id(@creator) %>
var form = $('#<%= params[:form_id] %>');
form.attr('id', '<%= form_id %>');
form.attr('action', '<%= creators_update_path %>');
form.find("#creator_id").attr('value', '<%= @creator.id %>');
form.find("#form_id").attr('value', '<%= form_id %>');

$('<input>').attr({
  type: 'hidden',
  name: '_method',
  value: 'patch'
}).appendTo(form);<commit_msg>fix focus notification on affliations<commit_after><% if @metadata_entry.creators.exists? %>
  <% @metadata_entry.creators.each do |creator| %>
    // this changes the parts of the form that need to be changed so it converts it to a patch action (POST)
    <% form_id = unique_form_id(creator) %>
    var form = $('#<%= params[:form_id] %>');
    form.attr('id', '<%= form_id %>');
    form.attr('action', '<%= creators_update_path %>');
    form.find("#creator_id").attr('value', '<%= creator.id %>');
    form.find("#form_id").attr('value', '<%= form_id %>');

    $('<input>').attr({
      type: 'hidden',
      name: '_method',
      value: 'patch'
    }).appendTo(form);
  <% end %>
<% end %>
{'fraction_non_alphanumeric': 0.23076923076923078, 'fraction_numerical': 0.0, 'mean_word_length': 4.401785714285714, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '4547168', 'n_tokens_mistral': 436, 'n_tokens_neox': 399, 'n_words': 96}