<commit_before><div class="global-jumbotron" id="poem_form">

	<% if poem.errors.any? %>
		<%= render partial: 'layouts/model_errors', locals: { model: poem } %>
	<% end %>

	<%= form_for poem, html: { class: "global-form" } do |f| %>

		<%= f.hidden_field :author_id %>

	    <div class="form-group">
	      <%= f.label :title %><br />
	      <%= f.text_field :title, class: "form-control global-form-input" %>
	    </div>

	   	<div class="form-group">
	      <%= f.label :body %><br />
	      <%= f.text_area :body, class: "form-control global-form-textarea", rows: 20 %>
	    </div>

	    <div class="align-left" id="poem_genre_checkboxes">
			<%= f.collection_check_boxes :genre_ids, policy_scope(poem.genres).limit(policy_scope(poem.genres).count), :id, :name do |b|
					raw("<div class='checkbox'>#{b.check_box(class: "global-form-checkbox")}#{b.label(class: "") {raw("<span></span>#{b.text}")}}</div>")
			end %>
		</div>

		<% for i in -2..-1 do %>
		    <%= f.fields_for :genres, poem.genres[i] && !poem.genres[i].persisted? ? poem.genres[i] : Genre.new  do |genres_fields| %>
			    <div class="form-group">
					<%= genres_fields.label :name, "Genre Name" %><br />
					<%= genres_fields.text_field :name, class: "form-control global-form-input" %>
				</div>
		    <% end %>

	    <% end %>

	    <%= render partial: 'layouts/forms/form_for/checkbox', locals: {form_builder: f, method_symbol: :private?, label: "Private?"} %>

	    <div class="actions">
	      <%= f.submit current_path_name.match(/new_/) ? "Create" : "Update", class: "btn global-form-btn" %>
	    </div>


	<% end %>

</div><commit_msg>bug fixing<commit_after><div class="global-jumbotron" id="poem_form">

	<% if poem.errors.any? %>
		<%= render partial: 'layouts/model_errors', locals: { model: poem } %>
	<% end %>

	<%= form_for poem, html: { class: "global-form" } do |f| %>

		<%= f.hidden_field :author_id %>

	    <div class="form-group">
	      <%= f.label :title %><br />
	      <%= f.text_field :title, class: "form-control global-form-input" %>
	    </div>

	   	<div class="form-group">
	      <%= f.label :body %><br />
	      <%= f.text_area :body, class: "form-control global-form-textarea", rows: 20 %>
	    </div>

	    <div class="align-left" id="poem_genre_checkboxes">
			<%= f.collection_check_boxes :genre_ids, policy_scope(poem.genres), :id, :name do |b|
					raw("<div class='checkbox'>#{b.check_box(class: "global-form-checkbox")}#{b.label(class: "") {raw("<span></span>#{b.text}")}}</div>")
			end %>
		</div>

		<% for i in -2..-1 do %>
		    <%= f.fields_for :genres, poem.genres[i] && !poem.genres[i].persisted? ? poem.genres[i] : Genre.new  do |genres_fields| %>
			    <div class="form-group">
					<%= genres_fields.label :name, "Genre Name" %><br />
					<%= genres_fields.text_field :name, class: "form-control global-form-input" %>
				</div>
		    <% end %>

	    <% end %>

	    <%= render partial: 'layouts/forms/form_for/checkbox', locals: {form_builder: f, method_symbol: :private?, label: "Private?"} %>

	    <div class="actions">
	      <%= f.submit current_path_name.match(/new_/) ? "Create" : "Update", class: "btn global-form-btn" %>
	    </div>


	<% end %>

</div>
{'fraction_non_alphanumeric': 0.21808510638297873, 'fraction_numerical': 0.0025031289111389237, 'mean_word_length': 3.2912751677852348, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 79, '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': '6249611', 'n_tokens_mistral': 1351, 'n_tokens_neox': 1166, 'n_words': 222}