Sha256: ada8af125014be0a205a9dbcb46af1e57908e2a18284cda651189727051888b4

Contents?: true

Size: 560 Bytes

Versions: 1

Compression:

Stored size: 560 Bytes

Contents

module SimpleForm
  module Inputs
    class CollectionCheckBoxesInput < CollectionRadioButtonsInput
      protected

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

      def build_nested_boolean_style_item_tag(text, value, html_options)
        @builder.check_box(attribute_name, html_options, value, nil) + text
      end

      def item_wrapper_class
        "checkbox"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simple_form-2.0.0.rc lib/simple_form/inputs/collection_check_boxes_input.rb