This project is archived and is in readonly mode.
InstanceTag to_label_tag id attribute
-
Di Marcello
somehow something went wrong in my ticket body.
it should look like this:name_and_id = options.dup
+ name_and_id["id"] = name_and_id.delete("for") -
Di Marcello
damnit!!!! my lines get messed up.
the plus sign was the mark. So the line I added was only:name_and_id["id"] = name_and_id.delete("for") -
Di Marcello
Why doesnt anyone picks this up?
Did i do something wrong? it isnt such a big fix -
Matt Jones
The diff you've provided doesn't make sense against 2-3-stable, and the test doesn't appear likely to fail there either. What version of Rails did you encounter this problem on?
-
Di Marcello
on rails 2.3.2 the github master branche at the time of posting
-
Matt Duncan
- Tag changed from actionpack, actionview, form_helper, instance_tag, label, to_label_tag to actionpack, actionview, bugmash, form_helper, instance_tag, label, to_label_tag
Patch didn't apply cleanly for me so I re-created it and tweaked the tests for better coverage.
I've attached a patch.
-
Adam Keys
I've verified this applies cleanly to 2-3-stable. Test coverage looks good. +1
-
Josh Nichols
- Tag changed from actionpack, actionview, bugmash, form_helper, instance_tag, label, to_label_tag to actionpack, actionview, bugmash, form_helper, instance_tag, label, to_label_tag, verified
It's reasonable enough to want to add an ID to a label, so +1.
Verified Matt's patch applies to 2-3-stable, and works as advertised.
-
Josh Nichols
Also verified it applies and works on master.
-
Elad Meidar
+1 verified, +1 patch applies on 2-3-stable and master, tests pass on both.
i can think of several cases where i'd like to have id on a label.
-
Tristan Dunn
+1
Verified the patch applies to master and 2-3-stable cleanly with passing tests.
-
Repository
(from [ba961250bd07a131329fb90cc998c1f28d5aac14]) Fixed to_label_tag to accept id attribute without changing for attribute [#2660 InstanceTag to_label_tag id attribute status:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/ba961250bd07a131329fb90cc998c1... -
Repository
(from [920ef4e6f3832ea1d3297e2e7e5f0f775dab69a8]) Fixed to_label_tag to accept id attribute without changing for attribute [#2660 InstanceTag to_label_tag id attribute status:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/920ef4e6f3832ea1d3297e2e7e5f0f... -
José Valim
- State changed from new to resolved
- Tag changed from actionpack, actionview, bugmash, form_helper, instance_tag, label, to_label_tag, verified to actionpack, actionview, form_helper, instance_tag, label, to_label_tag, verified
