diff options
author | Matt Duncan <mrduncan@gmail.com> | 2009-08-08 11:50:17 -0400 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-08-09 23:54:21 +0100 |
commit | 920ef4e6f3832ea1d3297e2e7e5f0f775dab69a8 (patch) | |
tree | 1fd7224650426594059ca6888423d3eb72a41e5c /actionpack/lib | |
parent | e391c7a97cdefa172fcba214fb0a6cd3bd5b0bf4 (diff) | |
download | rails-920ef4e6f3832ea1d3297e2e7e5f0f775dab69a8.tar.gz rails-920ef4e6f3832ea1d3297e2e7e5f0f775dab69a8.tar.bz2 rails-920ef4e6f3832ea1d3297e2e7e5f0f775dab69a8.zip |
Fixed to_label_tag to accept id attribute without changing for attribute [#2660 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 1 |
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 72f162cb20..81029102b1 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -738,6 +738,7 @@ module ActionView options = options.stringify_keys tag_value = options.delete("value") name_and_id = options.dup + name_and_id["id"] = name_and_id["for"] add_default_name_and_id_for_value(tag_value, name_and_id) options.delete("index") options["for"] ||= name_and_id["id"] |