<commit_before>module RailsAdmin
  module Config
    module Fields
      module Types
        class Boolean < RailsAdmin::Config::Fields::Base
          # Register field type for the type loader
          RailsAdmin::Config::Fields::Types.register(self)

          register_instance_option :view_helper do
            :check_box
          end

          register_instance_option :pretty_value do
            case value
            when nil
              %(<span class='label label-default'>&#x2012;</span>)
            when false
              %(<span class='label label-danger'>&#x2718;</span>)
            when true
              %(<span class='label label-success'>&#x2713;</span>)
            end.html_safe
          end

          register_instance_option :export_value do
            value.inspect
          end

          register_instance_option :partial do
            :form_boolean
          end

          # Accessor for field's help text displayed below input field.
          def generic_help
            ''
          end
        end
      end
    end
  end
end
<commit_msg>Update Boolean pretty_value to include default fallback<commit_after>module RailsAdmin
  module Config
    module Fields
      module Types
        class Boolean < RailsAdmin::Config::Fields::Base
          # Register field type for the type loader
          RailsAdmin::Config::Fields::Types.register(self)

          register_instance_option :view_helper do
            :check_box
          end

          register_instance_option :pretty_value do
            case value
            when false
              %(<span class='label label-danger'>&#x2718;</span>)
            when true
              %(<span class='label label-success'>&#x2713;</span>)
            else
              %(<span class='label label-default'>&#x2012;</span>)
            end.html_safe
          end

          register_instance_option :export_value do
            value.inspect
          end

          register_instance_option :partial do
            :form_boolean
          end

          # Accessor for field's help text displayed below input field.
          def generic_help
            ''
          end
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.0705244122965642, 'fraction_numerical': 0.0108499095840868, 'mean_word_length': 1.6662650602409639, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 15, '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': '3009395', 'n_tokens_mistral': 575, 'n_tokens_neox': 526, 'n_words': 151}