Class: FormProps::Inputs::CollectionRadioButtons

Inherits:
Base
  • Object
show all
Includes:
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



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

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

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

    input_props(@html_options)
  end
end