<commit_before>jQuery('.category').removeClass('hovering');
jQuery('#category_<%= @category.id %>_row').fadeOut();

<% if @category.parent && @category.parent.name != RacingAssociation.current.short_name %>
  jQuery('#category_<%= @category.parent_id %>_row').html('<%= escape_javascript(render("category", category: @category.parent)) %>');
  jQuery('#category_<%= @category.parent_id %>_row').effect("highlight", {}, 3000);
  jQuery('#category_<%= @category.id %>_row').remove();
<% else %>
  jQuery('#category_<%= @category.parent_id %>_row').html("<%= escape_javascript(render(@children.sort_by(&:name))) %>");
<% end %>


bindCategoryEvents();<commit_msg>Always remove dropped category before parent is updated<commit_after>jQuery('.category').removeClass('hovering');
jQuery('#category_<%= @category.id %>_row').fadeOut();
jQuery('#category_<%= @category.id %>_row').remove();

<% if @category.parent && @category.parent.name != RacingAssociation.current.short_name %>
  jQuery('#category_<%= @category.parent_id %>_row').html('<%= escape_javascript(render("category", category: @category.parent)) %>');
  jQuery('#category_<%= @category.parent_id %>_row').effect("highlight", {}, 3000);
<% else %>
  jQuery('#category_<%= @category.parent_id %>_row').html("<%= escape_javascript(render(@children.sort_by(&:name))) %>");
<% end %>

bindCategoryEvents();
{'fraction_non_alphanumeric': 0.235467255334805, 'fraction_numerical': 0.005886681383370125, 'mean_word_length': 8.645390070921986, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '5886946', 'n_tokens_mistral': 449, 'n_tokens_neox': 394, 'n_words': 62}