Permalink
Browse files

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
  • Loading branch information...
1 parent 665ab93 commit ec6f0a1f519eea50a924079637f3aaddfd60944b @dhh dhh committed Jun 16, 2005
Showing with 3 additions and 1 deletion.
  1. +2 −0 actionpack/CHANGELOG
  2. +1 −1 actionpack/lib/action_view/helpers/form_helper.rb
View
@@ -1,5 +1,7 @@
*SVN*
+* Fixed radio_button to work with numeric values #1352 [demetrius]
+
* Added :extension option to NumberHelper#number_to_phone #1361 [delynnb]
* Added button_to as a form-based solution to deal with harmful actions that should be hidden behind POSTs. This makes it just as easy as link_to to create a safe trigger for actions like destroy, although it's limited by being a block element, the fixed look, and a no-no inside other forms. #1371 [tom@moertel.com]
@@ -175,7 +175,7 @@ def to_radio_button_tag(tag_value, options = {})
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}"

0 comments on commit ec6f0a1

Please sign in to comment.