aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorKevin Glowacz <glowacz@gmail.com>2008-04-30 17:21:18 -0500
committerJoshua Peek <josh@joshpeek.com>2008-04-30 17:21:18 -0500
commitc83f75812ef89aea1b8d138aebec25de8057f156 (patch)
treeb44d83fb5da25ea8b833037d6e074adb3bff8759 /actionpack/lib/action_view/helpers
parent96d9691e71319f4c166315a36b96c2c3c54ed493 (diff)
downloadrails-c83f75812ef89aea1b8d138aebec25de8057f156.tar.gz
rails-c83f75812ef89aea1b8d138aebec25de8057f156.tar.bz2
rails-c83f75812ef89aea1b8d138aebec25de8057f156.zip
Fixed labels that have a bracketed name and an index [#68 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 829f84dd64..4459ccbce5 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -471,6 +471,7 @@ module ActionView
options = options.stringify_keys
name_and_id = options.dup
add_default_name_and_id(name_and_id)
+ options.delete("index")
options["for"] ||= name_and_id["id"]
content = (text.blank? ? nil : text.to_s) || method_name.humanize
label_tag(name_and_id["id"], content, options)