From c83f75812ef89aea1b8d138aebec25de8057f156 Mon Sep 17 00:00:00 2001 From: Kevin Glowacz Date: Wed, 30 Apr 2008 17:21:18 -0500 Subject: Fixed labels that have a bracketed name and an index [#68 state:resolved] Signed-off-by: Joshua Peek --- actionpack/lib/action_view/helpers/form_helper.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_view/helpers') 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) -- cgit v1.2.3