method
to_boolean_select_tag
rails latest stable - Class:
ActionView::Helpers::InstanceTagMethods
to_boolean_select_tag(options = {})public
No documentation available.
# File actionpack/lib/action_view/helpers/form_helper.rb, line 980
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