<commit_before>module Knish
  class CollectionMember < SimpleDelegator
    attr_reader :model, :collection

    def initialize(model, collection)
      @model = model
      @collection = collection
      super(model)
    end

    def validate_and_reconfigure
      raise_if_unacceptable
      update_config
      self
    end

    def self.model_name
      model.class.model_name
    end
<commit_msg>more munging for Rails forms<commit_after>module Knish
  class CollectionMember < SimpleDelegator
    attr_reader :model, :collection

    def initialize(model, collection)
      @model = model
      @collection = collection
      super(model)
    end

    def validate_and_reconfigure
      raise_if_unacceptable
      update_config
      self.class.model_name ||= model.class.model_name # what's not to hate about Rails forms
      self
    end

    class << self
      attr_accessor :model_name
    end

{'fraction_non_alphanumeric': 0.05187637969094923, 'fraction_numerical': 0.0, 'mean_word_length': 2.763485477178423, 'pattern_counts': {'":': 0, '<': 7, '<?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': '3285224', 'n_tokens_mistral': 263, 'n_tokens_neox': 251, 'n_words': 68}