Module: JqueryUiForm::Inputs::SelectInput
- Included in:
- FormBuilder
- Defined in:
- lib/jquery_ui_form/inputs/select_input.rb
Constant Summary collapse
- SELECT_OPTIONS =
%w(selected include_blank disabled required)
Instance Method Summary collapse
Instance Method Details
#select(method, options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/jquery_ui_form/inputs/select_input.rb', line 9 def select(method, = {}) choices = .delete(:collection) if [:value] [:selected] = .delete(:value) end = .delete(:html) || {} .each do |key,value| [key] = .delete(key) unless SELECT_OPTIONS.include?(key.to_s) end super(method, choices, , ) end |
#select_input(method, options = {}) ⇒ Object
5 6 7 |
# File 'lib/jquery_ui_form/inputs/select_input.rb', line 5 def select_input(method, = {}) basic_input_helper(:select, :select, method, ) end |