<commit_before>= f.object.errors.inspect if Rails.env.development? && f.object.errors.any?
= field_set do
  = f.input :name
  = f.input :nature, as: :radio_buttons, show: '.{{value}}-nature-options'
  = f.referenced_nomenclature :production_system
  = f.referenced_nomenclature :family, input_html: {data: {activity_family: true}}
  - family = Nomen::ActivityFamily[f.object.family]
  = f.input :with_cultivation, as: :hidden
  = f.referenced_nomenclature :cultivation_variety, collection: ((family and family.cultivation_variety) ? Nomen::Variety.selection(family.cultivation_variety) : []), wrapper_html: {style: "display: #{(family and family.cultivation_variety) ? 'block' : 'none'}"}
  -#= f.input :with_supports, as: :hidden
  -# = f.input :support_variety, collection: ((family and family.support_variety) ? Nomen::Variety.selection(family.support_variety) : []), wrapper_html: {style: "display: #{(family and family.support_variety) ? 'block' : 'none'}"}
  = f.input :production_cycle, as: :radio_buttons, show: '.{{value}}-production-cycle-options'
  .perennial-production-cycle-options
    = f.input :production_campaign, as: :radio_buttons
  -#.main-nature-options
    = f.input :size_indicator_name
    = f.input :size_unit_name
  = f.input :description
  = f.custom_fields
  = f.input :use_countings
  = f.input :use_gradings, show: '#gradings'

= field_set(:gradings) do
  #gradings
    = f.input :use_grading_calibre, show: '#grading_calibre'
    #grading_calibre
      = f.referenced_nomenclature :grading_calibre_indicator, collection: Nomen::Indicator.where(unit: Nomen::Unit.where(dimension: :distance)).selection, include_blanks: false
      = f.referenced_nomenclature :grading_calibre_unit, collection: Nomen::Unit.where(dimension: :distance).selection, include_blanks: false
    = f.input :measure_grading_items_count
    = f.input :measure_grading_net_mass, show: '#grading_net_mass'
    #grading_net_mass
      = f.referenced_nomenclature :grading_net_mass_unit, collection: Nomen::Unit.where(dimension: :mass).selection, include_blanks: false
    = f.input :measure_grading_sizes, show: '#grading_sizes'<commit_msg>Add mass dimension in calibre grading indicator selection.<commit_after>= f.object.errors.inspect if Rails.env.development? && f.object.errors.any?
= field_set do
  = f.input :name
  = f.input :nature, as: :radio_buttons, show: '.{{value}}-nature-options'
  = f.referenced_nomenclature :production_system
  = f.referenced_nomenclature :family, input_html: {data: {activity_family: true}}
  - family = Nomen::ActivityFamily[f.object.family]
  = f.input :with_cultivation, as: :hidden
  = f.referenced_nomenclature :cultivation_variety, collection: ((family and family.cultivation_variety) ? Nomen::Variety.selection(family.cultivation_variety) : []), wrapper_html: {style: "display: #{(family and family.cultivation_variety) ? 'block' : 'none'}"}
  -#= f.input :with_supports, as: :hidden
  -# = f.input :support_variety, collection: ((family and family.support_variety) ? Nomen::Variety.selection(family.support_variety) : []), wrapper_html: {style: "display: #{(family and family.support_variety) ? 'block' : 'none'}"}
  = f.input :production_cycle, as: :radio_buttons, show: '.{{value}}-production-cycle-options'
  .perennial-production-cycle-options
    = f.input :production_campaign, as: :radio_buttons
  -#.main-nature-options
    = f.input :size_indicator_name
    = f.input :size_unit_name
  = f.input :description
  = f.custom_fields
  = f.input :use_countings
  = f.input :use_gradings, show: '#gradings'

= field_set(:gradings) do
  #gradings
    = f.input :use_grading_calibre, show: '#grading_calibre'
    #grading_calibre
      = f.referenced_nomenclature :grading_calibre_indicator, collection: Nomen::Indicator.where(unit: Nomen::Unit.where(dimension: [:distance, :mass])).selection, include_blanks: false
      = f.referenced_nomenclature :grading_calibre_unit, collection: Nomen::Unit.where(dimension: [:distance, :mass]).selection, include_blanks: false
    = f.input :measure_grading_items_count
    = f.input :measure_grading_net_mass, show: '#grading_net_mass'
    #grading_net_mass
      = f.referenced_nomenclature :grading_net_mass_unit, collection: Nomen::Unit.where(dimension: :mass).selection, include_blanks: false
    = f.input :measure_grading_sizes, show: '#grading_sizes'
{'fraction_non_alphanumeric': 0.1378596087456847, 'fraction_numerical': 0.0, 'mean_word_length': 5.635114503816794, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4729717', 'n_tokens_mistral': 1528, 'n_tokens_neox': 1458, 'n_words': 266}