method
to_boolean_select_tag
v2.3.2 -
Show latest stable
-
0 notes -
Class: ActionView::Helpers::InstanceTag
- 1.0.0
- 1.1.0
- 1.1.1
- 1.1.6
- 1.2.0
- 1.2.6
- 2.0.0
- 2.0.1
- 2.0.3
- 2.1.0 (0)
- 2.2.1 (0)
- 2.3.2 (0)
- 2.3.8 (0)
- 3.0.0
- 3.0.5
- 3.0.7
- 3.0.9
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.3 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- What's this?
to_boolean_select_tag(options = {})
public
Hide source
# File actionpack/lib/action_view/helpers/form_helper.rb, line 792 def to_boolean_select_tag(options = {}) options = options.stringify_keys add_default_name_and_id(options) value = value(object) tag_text = "<select" tag_text << tag_options(options) tag_text << "><option value=\"false\"" tag_text << " selected" if value == false tag_text << ">False</option><option value=\"true\"" tag_text << " selected" if value tag_text << ">True</option></select>" end


