<commit_before><%- attributes.each do |attribute| -%>
  <%- if @beautiful_attributes.include?(attribute.name + ':richtext') then -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <%%= f.text_area :<%= attribute.name %>, :class => "richtext-editor" %>
    </div>
    <div class="form-group">
      <label class="control-label" for="inlineCheckboxes"></label>
      <% for type in richtext_type %>
        <%% hashradio = {:id => "<%= attribute.name %>-<%= type %>", :class => "select-richtext", 'data-editor' => 'markItUp<%= singular_table_name.capitalize %>_<%= attribute.name.downcase %>', 'data-spleditor' => '<%= singular_table_name %>_<%= attribute.name %>' } %>
        <%% hashradio[:checked] = "checked" if @<%= singular_table_name %>.<%= attribute.name %>_typetext == "<%= type %>" %>
        <label for="<%= attribute.name %>-<%= type %>" class="label-richtext-type checkbox inline">
          <%%= f.radio_button :<%= attribute.name %>_typetext, "<%= type %>", hashradio  %>
          <%= type.capitalize %>
        </label>
      <% end %>
    </div>

    <%% rttype = @<%= singular_table_name %>.<%= attribute.name %>_typetext.to_s %>
    <%% if not rttype.blank? then %>
    <script language="javascript">
      $(document).ready(function(){
        $('#<%= singular_table_name %>_<%= attribute.name %>').markItUp(my<%%= rttype.capitalize %>Settings);
        $('#markItUp<%= singular_table_name.capitalize %>_<%= attribute.name.downcase %>').addClass('<%%= rttype.downcase %>');
      });
    </script>
    <%% end %>
  <%- elsif @beautiful_attributes.include?(attribute.name + ':wysiwyg') then -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <%%= f.text_area :<%= attribute.name %>, :class => "wysiwyg-editor form-control" %>
    </div>
    <%%= f.hidden_field :<%= attribute.name %>_typetext, :value => "html"  %>
  <%- elsif @beautiful_attributes.include?(attribute.name + ':references') then -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <%%= f.collection_select :<%= attribute.name %>_id, <%= attribute.name.camelcase %>.all, :id, :caption, { :include_blank => true }, { :class => "form-control" } %>
    </div>
  <%- elsif @beautiful_attributes.include?(attribute.name + ':price') then -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <div class="input-group">
        <span class="input-group-addon">$</span><%%= f.<%= attribute.field_type %> :<%= attribute.name %>, :class => "form-control" %>
      </div>
    </div>
  <%- elsif @beautiful_attributes.include?(attribute.name + ':date') then -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(3i)]" id="<%= singular_table_name %>_<%= attribute.name %>_3i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.day rescue "" end %>" />
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(2i)]" id="<%= singular_table_name %>_<%= attribute.name %>_2i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.mon rescue "" end %>" />
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(1i)]" id="<%= singular_table_name %>_<%= attribute.name %>_1i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.year rescue "" end %>" />
      <div class="input-group">
        <%%= f.text_field :<%= attribute.name %>, :class => "dpicker form-control" %><span class="input-group-addon"><i class="fa fa-calendar"></i></span>
      </div>
    </div>
  <%- elsif @beautiful_attributes.include?(attribute.name + ':datetime') then -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(3i)]" id="<%= singular_table_name %>_<%= attribute.name %>_3i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.day rescue "" end %>" />
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(2i)]" id="<%= singular_table_name %>_<%= attribute.name %>_2i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.mon rescue "" end %>" />
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(1i)]" id="<%= singular_table_name %>_<%= attribute.name %>_1i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.year rescue "" end %>" />
      <div class="input-group">
        <%%= f.text_field :<%= attribute.name %>, :class => "dpicker form-control" %><span class="input-group-addon"><i class="fa fa-calendar"></i></span>
      </div>
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(4i)]" id="<%= singular_table_name %>_<%= attribute.name %>_4i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.min rescue "" end %>" />
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(5i)]" id="<%= singular_table_name %>_<%= attribute.name %>_5i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.hour rescue "" end %>" />
      <div class="input-group">
        <%%= f.text_field :<%= attribute.name %>, :class => "tpicker form-control" %><span class="input-group-addon"><i class="fa fa-clock-o"></i></span>
      </div>
    </div>
  <%- elsif @beautiful_attributes.include?(attribute.name + ':color') then -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <div class="input-group color" data-color="<%%= (@<%= model %>.<%= attribute.name %> || "rgba(0, 0, 0)") %>" data-color-format="rgba">
        <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, :class => "form-control" %><span class="input-group-addon"><i style="background-color: rgb(0, 0, 0)"></i></span>
      </div>
    </div>
  <%- else -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <%%= f.<%= attribute.field_type %> :<%= attribute.name %><%= ', :rows => 5' if attribute.field_type == :text_area %>, :class => "form-control" %>
    </div>
  <%- end -%>
<%- end -%>
<commit_msg>remain value with date format<commit_after><%- attributes.each do |attribute| -%>
  <%- if @beautiful_attributes.include?(attribute.name + ':richtext') then -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <%%= f.text_area :<%= attribute.name %>, :class => "richtext-editor" %>
    </div>
    <div class="form-group">
      <label class="control-label" for="inlineCheckboxes"></label>
      <% for type in richtext_type %>
        <%% hashradio = {:id => "<%= attribute.name %>-<%= type %>", :class => "select-richtext", 'data-editor' => 'markItUp<%= singular_table_name.capitalize %>_<%= attribute.name.downcase %>', 'data-spleditor' => '<%= singular_table_name %>_<%= attribute.name %>' } %>
        <%% hashradio[:checked] = "checked" if @<%= singular_table_name %>.<%= attribute.name %>_typetext == "<%= type %>" %>
        <label for="<%= attribute.name %>-<%= type %>" class="label-richtext-type checkbox inline">
          <%%= f.radio_button :<%= attribute.name %>_typetext, "<%= type %>", hashradio  %>
          <%= type.capitalize %>
        </label>
      <% end %>
    </div>

    <%% rttype = @<%= singular_table_name %>.<%= attribute.name %>_typetext.to_s %>
    <%% if not rttype.blank? then %>
    <script language="javascript">
      $(document).ready(function(){
        $('#<%= singular_table_name %>_<%= attribute.name %>').markItUp(my<%%= rttype.capitalize %>Settings);
        $('#markItUp<%= singular_table_name.capitalize %>_<%= attribute.name.downcase %>').addClass('<%%= rttype.downcase %>');
      });
    </script>
    <%% end %>
  <%- elsif @beautiful_attributes.include?(attribute.name + ':wysiwyg') then -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <%%= f.text_area :<%= attribute.name %>, :class => "wysiwyg-editor form-control" %>
    </div>
    <%%= f.hidden_field :<%= attribute.name %>_typetext, :value => "html"  %>
  <%- elsif @beautiful_attributes.include?(attribute.name + ':references') then -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <%%= f.collection_select :<%= attribute.name %>_id, <%= attribute.name.camelcase %>.all, :id, :caption, { :include_blank => true }, { :class => "form-control" } %>
    </div>
  <%- elsif @beautiful_attributes.include?(attribute.name + ':price') then -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <div class="input-group">
        <span class="input-group-addon">$</span><%%= f.<%= attribute.field_type %> :<%= attribute.name %>, :class => "form-control" %>
      </div>
    </div>
  <%- elsif @beautiful_attributes.include?(attribute.name + ':date') then -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(3i)]" id="<%= singular_table_name %>_<%= attribute.name %>_3i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.day rescue "" end %>" />
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(2i)]" id="<%= singular_table_name %>_<%= attribute.name %>_2i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.mon rescue "" end %>" />
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(1i)]" id="<%= singular_table_name %>_<%= attribute.name %>_1i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.year rescue "" end %>" />
      <div class="input-group">
        <%%= f.text_field :<%= attribute.name %>, :value => @<%= singular_table_name %>.<%= attribute.name %>.strftime("%d/%m/%Y"), :class => "dpicker form-control" %><span class="input-group-addon"><i class="fa fa-calendar"></i></span>
      </div>
    </div>
  <%- elsif @beautiful_attributes.include?(attribute.name + ':datetime') then -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(3i)]" id="<%= singular_table_name %>_<%= attribute.name %>_3i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.day rescue "" end %>" />
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(2i)]" id="<%= singular_table_name %>_<%= attribute.name %>_2i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.mon rescue "" end %>" />
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(1i)]" id="<%= singular_table_name %>_<%= attribute.name %>_1i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.year rescue "" end %>" />
      <div class="input-group">
        <%%= f.text_field :<%= attribute.name %>, :value => @<%= singular_table_name %>.<%= attribute.name %>.strftime("%d/%m/%Y"), :class => "dpicker form-control" %><span class="input-group-addon"><i class="fa fa-calendar"></i></span>
      </div>
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(4i)]" id="<%= singular_table_name %>_<%= attribute.name %>_4i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.min rescue "" end %>" />
      <input type="hidden" name="<%= singular_table_name %>[<%= attribute.name %>(5i)]" id="<%= singular_table_name %>_<%= attribute.name %>_5i" value="<%%= begin @<%= singular_table_name %>.<%= attribute.name %>.hour rescue "" end %>" />
      <div class="input-group">
        <%%= f.text_field :<%= attribute.name %>, :value => @<%= singular_table_name %>.<%= attribute.name %>.strftime("%H:%M"), :class => "tpicker form-control" %><span class="input-group-addon"><i class="fa fa-clock-o"></i></span>
      </div>
    </div>
  <%- elsif @beautiful_attributes.include?(attribute.name + ':color') then -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <div class="input-group color" data-color="<%%= (@<%= model %>.<%= attribute.name %> || "rgba(0, 0, 0)") %>" data-color-format="rgba">
        <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, :class => "form-control" %><span class="input-group-addon"><i style="background-color: rgb(0, 0, 0)"></i></span>
      </div>
    </div>
  <%- else -%>
    <div class="form-group">
      <%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
      <%%= f.<%= attribute.field_type %> :<%= attribute.name %><%= ', :rows => 5' if attribute.field_type == :text_area %>, :class => "form-control" %>
    </div>
  <%- end -%>
<%- end -%>

{'fraction_non_alphanumeric': 0.24779073877695298, 'fraction_numerical': 0.005514316012725344, 'mean_word_length': 4.145871225900327, 'pattern_counts': {'":': 0, '<': 427, '<?xml version=': 0, '>': 478, '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': '4263693', 'n_tokens_mistral': 5314, 'n_tokens_neox': 4860, 'n_words': 860}