diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-03-24 21:32:50 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-03-24 21:32:50 +0000 |
commit | b0bfcca16efff329e0cfaebc18a7debed126473b (patch) | |
tree | a0926c4f73c773214ab21e87ceb310e919b76b89 /actionpack/lib/action_view | |
parent | 123f5a357dc176225d57dc78e773338642048120 (diff) | |
download | rails-b0bfcca16efff329e0cfaebc18a7debed126473b.tar.gz rails-b0bfcca16efff329e0cfaebc18a7debed126473b.tar.bz2 rails-b0bfcca16efff329e0cfaebc18a7debed126473b.zip |
Fixed that FormHelper#radio_button would produce invalid ids (closes #11298) [harlancrystal]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9088 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index cc3c09d50c..22c6562cc7 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -498,8 +498,8 @@ module ActionView options["checked"] = "checked" if checked pretty_tag_value = tag_value.to_s.gsub(/\s/, "_").gsub(/\W/, "").downcase options["id"] ||= defined?(@auto_index) ? - "#{@object_name}_#{@auto_index}_#{@method_name}_#{pretty_tag_value}" : - "#{@object_name}_#{@method_name}_#{pretty_tag_value}" + "#{tag_id_with_index(@auto_index)}_#{pretty_tag_value}" : + "#{tag_id}_#{pretty_tag_value}" add_default_name_and_id(options) tag("input", options) end |