<commit_before>class BookGridWithVirtualAttributes < Netzke::Basepack::GridPanel
  js_property :title, "Books"

  include Extras::BookPresentation

  def configure
    super
    config.model = "Book"
    config.columns = default_fields_for_forms
  end

  def default_fields_for_forms
    [
      {:name => :title},
      {:name => :author__first_name, :setter => author_first_name_setter},
      {:name => :exemplars},
      {:name => :in_abundance, :getter => in_abundance_getter}
    ]
  end
end<commit_msg>Update BookGridWithVirtualAttributes test component<commit_after>class BookGridWithVirtualAttributes < Netzke::Basepack::GridPanel
  js_property :title, "Books"

  include Extras::BookPresentation

  def configure
    super
    config.model = "Book"
  end

  def columns
    custom_fields
  end

  component :add_window do |c|
    super(c)
    c.form_config.items = custom_fields
  end

  component :edit_window do |c|
    super(c)
    c.form_config.items = custom_fields
  end

  def custom_fields
    [
      :title,
      {:name => "author__first_name", :setter => author_first_name_setter},
      :exemplars,
      {:name => "in_abundance", :getter => in_abundance_getter}
    ]
  end
end
{'fraction_non_alphanumeric': 0.09991673605328892, 'fraction_numerical': 0.0, 'mean_word_length': 3.640926640926641, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '4156244', 'n_tokens_mistral': 410, 'n_tokens_neox': 398, 'n_words': 82}