Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

FormHelper#label :id => nil doesn't nullify the id attribute

#3483

For at least #label and #text_field (my guess is the rest of the helpers) passing :id => nil as an option does not prevent the ID attribute from showing up on the tag.

If we can agree this is a bug then I believe the offending line is in:

FormHelper#add_default_name_and_id

http://github.com/rails/rails/blob/e972acc0d7b63e5ce15bed69f41214fe...

This does work as expected for label_tag and text_field_tag. It'd probably be good if they both worked the same way in this regard.

Reported by Josh Sharpe · November 12th, 2009 @ 05:59 AM

State: stale
Milestone: none
Assigned to: José Valim José Valim
Importance: none

Activity

  1. Łukasz Strzałkowski
    Łukasz Strzałkowski
    • Importance changed from to

    On Rails 3, head: b5b42af33f446ca3de1d80f92b8c9138dbf6c05d

    Works properly for me. It's pretty old, so I think it's invalid now.

    http://gist.github.com/456091

    June 28th, 2010 @ 05:59 PM

  2. Santiago Pastorino
    Santiago Pastorino
    • State changed from new to stale

    Please Josh try it again and if still fails i will reopen

    June 28th, 2010 @ 10:43 PM

  3. Łukasz Strzałkowski
    Łukasz Strzałkowski

    No body complained about it since my and Santiago updates, so I think it can be closed.

    July 9th, 2010 @ 07:15 PM

  4. Łukasz Strzałkowski
    Łukasz Strzałkowski
    • Assigned user set to José Valim

    Jose - squash it! ;)

    July 9th, 2010 @ 07:16 PM