= private = protected
radio_button_tag(name, value, checked = false, options = {})
Creates a radio button.
# File actionpack/lib/action_view/helpers/form_tag_helper.rb, line 149 def radio_button_tag(name, value, checked = false, options = {}) pretty_tag_value = value.to_s.gsub(/\s/, "_").gsub(/(?!-)\W/, "").downcase html_options = { "type" => "radio", "name" => name, "id" => "#{name}_#{pretty_tag_value}", "value" => value }.update(options.stringify_keys) html_options["checked"] = "checked" if checked tag :input, html_options end