<commit_before>require 'simple_form'
require 'simple_form/components/label_input'

module SimpleForm
  mattr_accessor :label_input_builder
  @@label_input_builder = nil
end

module SimpleForm
  module Components
    module LabelInput
      def label_input_with_proc
        if label_input_builder && label_input_builder.is_a?(Proc)
          label_input_builder.call(label,input).html_safe
        else
          #(options[:label] == false ? "" : label) + input
          label_input_without_proc
        end
      end
      alias_method_chain :label_input, :proc
      
      def label_input_builder
        options[:label_input_builder] || SimpleForm.label_input_builder
      end
    end
  end
end<commit_msg>Adapted our SimpleForm monkey patch so that it works even with booleans<commit_after>require 'simple_form'
require 'simple_form/components/label_input'
require 'simple_form/inputs/boolean_input'

module SimpleForm
  mattr_accessor :label_input_builder
  @@label_input_builder = nil
end

module SimpleForm
  module Components
    module LabelInput
      def label_input_with_proc
        if label_input_builder && label_input_builder.is_a?(Proc)
          label_input_builder.call(label,input).html_safe
        else
          #(options[:label] == false ? "" : label) + input
          label_input_without_proc
        end
      end
      alias_method_chain :label_input, :proc
      
      def label_input_builder
        options[:label_input_builder] || SimpleForm.label_input_builder
      end
    end
  end
end

module SimpleForm
  module Inputs
    class BooleanInput
      def label_input
        super
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.058287795992714025, 'fraction_numerical': 0.0, 'mean_word_length': 3.0591133004926108, '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': '4106735', 'n_tokens_mistral': 486, 'n_tokens_neox': 484, 'n_words': 109}