<commit_before>%h1 Vote now

%form{:action => "/vote", :method => "post"}
  - if @ballot.new_record?
    %label{:for => "ballot_name"} Your name:
    %input{:type => "text", :name => "ballot[name]", :id => "ballot_name"}
    @digitalpulp.com
    %h2 Submit your vote:
  - else
    %h2= "Welcome back, #{@ballot.name}. You may update your vote:"

  .taste
    %ul#sortable
      = list_of @entries do |entry|
        %label{:for => "ballot[taste][#{entry.name}]"}= entry.name
        %input{:type => 'text', :name => "ballot[taste][#{entry.name}]", :id => "ballot[taste][#{entry.name}]", :size => 2, :value => @ballot[:taste].index(entry.name)}
  %input{:type => "submit", :value => "Vote!"}

:javascript
  $('#sortable').sortable({
    update: function(event, ui) {
      $(ui.item[0]).parent().children().each(function(index,child) {
        $(child).children('input').val(index);
      })
    }
  });<commit_msg>Legit IDs<commit_after>%h1 Vote now

%form{:action => "/vote", :method => "post"}
  - if @ballot.new_record?
    %label{:for => "ballot_name"} Your name:
    %input{:type => "text", :name => "ballot[name]", :id => "ballot_name"}
    @digitalpulp.com
    %h2 Submit your vote:
  - else
    %h2= "Welcome back, #{@ballot.name}. You may update your vote:"

  .taste
    %ul#sortable
      = list_of @entries do |entry|
        %label{:for => "ballot_taste_#{entry.name}"}= entry.name
        %input{:type => 'text', :name => "ballot[taste][#{entry.name}]", :id => "ballot_taste_#{entry.name}", :size => 2, :value => @ballot[:taste].index(entry.name)}
  %input{:type => "submit", :value => "Vote!"}

:javascript
  $('#sortable').sortable({
    update: function(event, ui) {
      $(ui.item[0]).parent().children().each(function(index,child) {
        $(child).children('input').val(index);
      })
    }
  });
{'fraction_non_alphanumeric': 0.23076923076923078, 'fraction_numerical': 0.005494505494505495, 'mean_word_length': 3.645408163265306, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 31, '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': '4763332', 'n_tokens_mistral': 676, 'n_tokens_neox': 675, 'n_words': 129}