From ad29870c21f2f196858251831f527e52a7ef27cb Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 28 Jan 2007 16:17:55 +0000 Subject: 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 --- actionpack/lib/action_view/helpers/form_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view') 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 -- cgit v1.2.3