Class: FormtasticBootstrap::Inputs::SelectInput

Inherits:
Formtastic::Inputs::SelectInput
  • Object
show all
Includes:
Base, Base::Collections, Base::GroupedCollections
Defined in:
lib/formtastic-bootstrap/inputs/select_input.rb

Instance Method Summary collapse

Methods included from Base::Wrapping

#add_on_content, #add_on_wrapper_classes, #bootstrap_wrapping, #form_group_wrapping, #input_content, #prepended_or_appended?, #wrapper_html_options

Methods included from Base::Labelling

#label_html, #label_html_options

Methods included from Base::Hints

#hint_html

Methods included from Base::Errors

#error_first_html, #error_html, #error_list_html, #error_none_html, #error_sentence_html

Methods included from Base::Html

#form_control_input_html_options, #input_html_options

Instance Method Details

#grouped_select_htmlObject



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/formtastic-bootstrap/inputs/select_input.rb', line 12

def grouped_select_html
  builder.grouped_collection_select(
    input_name,
    grouped_collection,
    group_association,
    group_label_method,
    value_method,
    label_method,
    input_options,
    form_control_input_html_options
  )
end

#select_htmlObject



8
9
10
# File 'lib/formtastic-bootstrap/inputs/select_input.rb', line 8

def select_html
  builder.select(input_name, collection, input_options, form_control_input_html_options)
end

#to_htmlObject



25
26
27
28
29
# File 'lib/formtastic-bootstrap/inputs/select_input.rb', line 25

def to_html
  bootstrap_wrapping do
    options[:group_by] ? grouped_select_html : select_html
  end
end