aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-01-28 16:17:55 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-01-28 16:17:55 +0000
commitad29870c21f2f196858251831f527e52a7ef27cb (patch)
tree5ec15691b34929324602bb8d037dc032393d7810 /actionpack/lib/action_view
parent50c1150e5388e109d7ceca388422cd504fd91462 (diff)
downloadrails-ad29870c21f2f196858251831f527e52a7ef27cb.tar.gz
rails-ad29870c21f2f196858251831f527e52a7ef27cb.tar.bz2
rails-ad29870c21f2f196858251831f527e52a7ef27cb.zip
select :multiple => true suffixes the attribute name with [] unless already suffixed. Closes #6977.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6078 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 045852d8db..84d1d8b670 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -387,7 +387,7 @@ module ActionView
options["name"] ||= tag_name_with_index(@auto_index)
options["id"] ||= tag_id_with_index(@auto_index)
else
- options["name"] ||= tag_name
+ options["name"] ||= tag_name + (options.has_key?('multiple') ? '[]' : '')
options["id"] ||= tag_id
end
end