Sha256: b47741c23d74c3d7fa200e6bc94b2cc76e2e8f2ef89087cb4471c125fcf71291

Contents?: true

Size: 572 Bytes

Versions: 5

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true
module SimpleForm
  module Inputs
    class CollectionCheckBoxesInput < CollectionRadioButtonsInput
      protected

      # Checkbox components do not use the required html tag.
      # More info: https://github.com/heartcombo/simple_form/issues/340#issuecomment-2871956
      def has_required?
        false
      end

      def build_nested_boolean_style_item_tag(collection_builder)
        collection_builder.check_box + collection_builder.text.to_s
      end

      def item_wrapper_class
        "checkbox"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
simple_form-5.3.0 lib/simple_form/inputs/collection_check_boxes_input.rb
simple_form-5.2.0 lib/simple_form/inputs/collection_check_boxes_input.rb
simple_form-5.1.0 lib/simple_form/inputs/collection_check_boxes_input.rb
simple_form-5.0.3 lib/simple_form/inputs/collection_check_boxes_input.rb
simple_form-5.0.2 lib/simple_form/inputs/collection_check_boxes_input.rb