Class: FormProps::Inputs::CollectionRadioButtons

Inherits:
Base
  • Object
show all
Includes:
ActionView::Helpers::FormOptionsHelper, ActionView::Helpers::Tags::CollectionHelpers, CollectionHelpers
Defined in:
lib/form_props/inputs/collection_radio_buttons.rb

Defined Under Namespace

Classes: RadioButtonBuilder

Instance Method Summary collapse

Methods included from CollectionHelpers

#default_html_options_for_collection, #hidden_field_name, #render_collection, #render_collection_for

Methods inherited from Base

#initialize, #json

Constructor Details

This class inherits a constructor from FormProps::Inputs::Base

Instance Method Details

#renderObject



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/form_props/inputs/collection_radio_buttons.rb', line 23

def render
  json.set!(sanitized_key) do
    json.collection do
      render_collection_for(RadioButtonBuilder)
    end

    json.includeHidden(@options.fetch(:include_hidden) { true })

    input_props(@html_options)
  end
end