diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-06-28 22:27:11 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-06-28 22:27:11 +0000 |
commit | 4d0780e9c796aab7c70dc138fea4374eb73b16cf (patch) | |
tree | c82a3b25657279ef14fd93470d1af7682bab5042 /actionpack/lib | |
parent | 8a207f6f22e90e8fe58fb940a93646129bcad60f (diff) | |
download | rails-4d0780e9c796aab7c70dc138fea4374eb73b16cf.tar.gz rails-4d0780e9c796aab7c70dc138fea4374eb73b16cf.tar.bz2 rails-4d0780e9c796aab7c70dc138fea4374eb73b16cf.zip |
Allow symbols as name
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7151 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_tag_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index bf82fa234a..c3cabb10f7 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -289,7 +289,7 @@ module ActionView # # => <input checked="checked" class="color_input" id="color_green" name="color" type="radio" value="green" /> def radio_button_tag(name, value, checked = false, options = {}) pretty_tag_value = value.to_s.gsub(/\s/, "_").gsub(/(?!-)\W/, "").downcase - pretty_name = name.gsub(/\[/, "_").gsub(/\]/, "") + pretty_name = name.to_s.gsub(/\[/, "_").gsub(/\]/, "") html_options = { "type" => "radio", "name" => name, "id" => "#{pretty_name}_#{pretty_tag_value}", "value" => value }.update(options.stringify_keys) html_options["checked"] = "checked" if checked tag :input, html_options |