<commit_before>- content_for :page_header do
  %h1
    - if @<%= resource_name %>.new_record?
      Добавить <%= resource_name %>
    - else
      Редактировать <%= resource_name %>

= form_for [:admin, @<%= resource_name %>] do |f|
  - if @<%= resource_name %>.errors.any?
    #error_explanation
      %h2= "Ошибки при сохранении: #{@<%= resource_name %>.errors.count}"
      %ul
        - @<%= resource_name %>.errors.full_messages.each do |msg|
          %li= msg
  %table
    <%- columns.each do |column| -%>
    <%- if column.field_type == "text_area" -%>
    %tr
      %th{colspan: 2}
        = f.label :<%= column.name %>
        %br
        = f.<%= column.field_type -%> :<%= column.name %>
    <%- else -%>
    %tr
      %th= f.label :<%= column.name %>
      %td= f.<%= column.field_type -%> :<%= column.name %>    
    <%- end -%>
  .actions
    = f.submit "Сохранить"
    = f.submit "Применить"<commit_msg>fix view edit<commit_after>- content_for :page_header do
  %h1
    - if @<%= resource_name %>.new_record?
      Добавить <%= resource_name %>
    - else
      Редактировать <%= resource_name %>

= form_for [:admin, @<%= resource_name %>] do |f|
  - if @<%= resource_name %>.errors.any?
    #error_explanation
      %h2= "Ошибки при сохранении: #{@<%= resource_name %>.errors.count}"
      %ul
        - @<%= resource_name %>.errors.full_messages.each do |msg|
          %li= msg
  %table
    <%- columns.each do |column| -%>
    <%- if column.field_type == "text_area" -%>
    %tr
      %th{colspan: 2}
        = f.label :<%= column.name %>
        %br
        = f.<%= column.field_type -%> :<%= column.name %>
    <%- else -%>
    %tr
      %th= f.label :<%= column.name %>
      %td= f.<%= column.field_type -%> :<%= column.name %>    
    <%- end -%>
    <%- end -%>
  .actions
    = f.submit "Сохранить"
    = f.submit "Применить"
{'fraction_non_alphanumeric': 0.19978401727861772, 'fraction_numerical': 0.0032397408207343412, 'mean_word_length': 2.217013888888889, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 38, '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': '1559183', 'n_tokens_mistral': 766, 'n_tokens_neox': 712, 'n_words': 134}