aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-06-16 06:34:08 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-06-16 06:34:08 +0000
commitec6f0a1f519eea50a924079637f3aaddfd60944b (patch)
treee2e02145551371aac386c8b429d2d08d850ae9c2 /actionpack/lib/action_view
parent665ab93761f3a42ccce12b10c1e9a958ae53e691 (diff)
downloadrails-ec6f0a1f519eea50a924079637f3aaddfd60944b.tar.gz
rails-ec6f0a1f519eea50a924079637f3aaddfd60944b.tar.bz2
rails-ec6f0a1f519eea50a924079637f3aaddfd60944b.zip
Fixed radio_button to work with numeric values #1352 [demetrius]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1439 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index fc2621ff01..afdda9cb27 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -175,7 +175,7 @@ module ActionView
options["type"] = "radio"
options["value"] = tag_value
options["checked"] = "checked" if value == tag_value
- pretty_tag_value = tag_value.gsub(/\s/, "_").gsub(/\W/, "").downcase
+ pretty_tag_value = tag_value.to_s.gsub(/\s/, "_").gsub(/\W/, "").downcase
options["id"] = @auto_index ?
"#{@object_name}_#{@auto_index}_#{@method_name}_#{pretty_tag_value}" :
"#{@object_name}_#{@method_name}_#{pretty_tag_value}"