Sha256: a461b7597c8f3bf07c839b4be0fe561976eb33e17ee9c650f0213147500348a6

Contents?: true

Size: 664 Bytes

Versions: 3

Compression:

Stored size: 664 Bytes

Contents

module CustomInputs
  class RadiosInput < SimpleForm::Inputs::CollectionRadioButtonsInput
    include UiBibz::Ui::Core::Forms::Choices

    def input(wrapper_options)
      i = UiBibz::Ui::Core::Forms::Choices::RadioField.new(attribute_name, options, input_html_options)
      options[:item_wrapper_tag] = :div
      options[:item_wrapper_class] = i.html_options[:class]

      label_method, value_method = detect_collection_methods

      @builder.send(:"collection_radio_buttons",
        attribute_name, collection, value_method, label_method,
        input_options, i.html_options,
        &collection_block_for_nested_boolean_style
      )
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ui_bibz-2.0.0.alpha28 app/inputs/custom_inputs/radios_input.rb
ui_bibz-2.0.0.alpha27 app/inputs/custom_inputs/radios_input.rb
ui_bibz-2.0.0.alpha26 app/inputs/custom_inputs/radios_input.rb