<commit_before>$j(function() {
  $j('a.hide, a.display').live('click', function(event) {
    event.preventDefault();
    var url = $j(this).attr('href');
    var rendered = $j(this).hasClass('display');
    $j(this).siblings('img').show();
    $j(this).hide();
    $j.ajax({
      context: $j(this).parents('li').first(),
      url: url,
      data: {
        core_field: {
          rendered_attributes: {
            rendered: rendered
          }
        }
      },
      dataType: 'script',
      type: 'PUT',
      success: function(data, status, xhr) {
        $j(this).replaceWith(data);
      }
    });
  });

});<commit_msg>Changed PUT request (via jQuery) to POST with '_method=PUT' added to the request data.<commit_after>$j(function() {
  $j('a.hide, a.display').live('click', function(event) {
    event.preventDefault();
    var url = $j(this).attr('href');
    var rendered = $j(this).hasClass('display');
    $j(this).siblings('img').show();
    $j(this).hide();
    $j.ajax({
      context: $j(this).parents('li').first(),
      url: url,
      data: {
        '_method': 'PUT',
        core_field: {
          rendered_attributes: {
            rendered: rendered
          }
        }
      },
      dataType: 'script',
      type: 'POST',
      success: function(data, status, xhr) {
        $j(this).replaceWith(data);
      }
    });
  });

});
{'fraction_non_alphanumeric': 0.19619326500732065, 'fraction_numerical': 0.0, 'mean_word_length': 2.278177458033573, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3420502', 'n_tokens_mistral': 448, 'n_tokens_neox': 446, 'n_words': 79}