<commit_before><% form_tag = 'tag-form' %>
<%= form_remote_tag :url => {:controller => "pages", :action => "tag", :id => @page},
      :complete => "Element.toggle($('tag-form')); Element.toggle($('tags'))",
      :update => "tags",
      :html => {:id => 'tag-form', :style => "display:none"} %>
<%= text_field_tag "tag_list",
      @page.tags.collect{|t| t.name}.join(" "),
      :size => 40 %>
<%= hidden_field_tag "form_id", 'tag-form' %>
<%= submit_tag("Save")  %>
<%= end_form_tag %>

<div id='tags'>

<%= render :partial => "pages/tags"%>
<br />

</div><commit_msg>added cancel button to tag area<commit_after><%
  toggle = "Element.toggle($('tag-form')); Element.toggle($('tags'))"
  tags = @page.tags.collect{|t| t.name}.join(" ")
-%>
<% form_remote_tag :url => {:controller => "pages", :action => "tag", :id => @page},
  :complete => toggle,
  :html => {:id => 'tag-form', :style => "display:none"},
  :update => "tags" do -%>
<%= text_field_tag "tag_list", tags %>
<%= hidden_field_tag "form_id", 'tag-form' %>
<%= submit_tag("Save") %>
<%= button_to_function "Cancel", toggle %>
<% end -%>

<div id='tags'>
<%= render :partial => "pages/tags"%><br />
</div>

{'fraction_non_alphanumeric': 0.2726495726495726, 'fraction_numerical': 0.0017094017094017094, 'mean_word_length': 4.497652582159624, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 45, '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': '2738876', 'n_tokens_mistral': 459, 'n_tokens_neox': 430, 'n_words': 85}