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.

form authentication interfering with page layout

#629

Rails automatically inserts these snippets to help authenticate forms:

<div style="margin: 0pt; padding: 0pt;">
<input type="hidden" value="put" name="_method"/>
<input type="hidden" value="461f8f380f7920fd06015c1d2541c23e71f11d8c" name="authenticity_token"/>
</div>

Occasionally, CSS styling overflows into these divs. However, it is impossible to remove the overflow from these divs because the divs do not have associated class names.

Suggested solution: Add class="hidden" to the div or just add the style to hide it.

Reported by Kevin Chiu · July 16th, 2008 @ 12:40 AM

State: stale
Milestone: 2.x
Assigned to: Rick Rick
Importance: none

Activity

  1. Rick
    Rick
    • State changed from new to open

    Should there be a global rails namespace for rails-generated classes? "hidden" seems like it'd be a pretty common class.

    rails-hidden-inputs ?

    July 16th, 2008 @ 12:58 AM

  2. Kevin Chiu
    Kevin Chiu

    That would work. As a side benefit, it would also help people looking over

    output code understand what is generated by Rails and what is not.

    On Tue, Jul 15, 2008 at 7:58 PM, Lighthouse

    wrote:

    July 16th, 2008 @ 01:10 AM

  3. Rune Botten
  4. Rune Botten
    Rune Botten
    • Tag changed from 2.1, bug to 2.1, actionpack, enhancement, patch, tested, tests

    Implementet this. Wrapping div gets class 'rails-hidden-inputs' when an element has type="hidden". If my implementation is too shady, there is at least updated tests for the div class.

    July 17th, 2008 @ 05:49 PM

  5. Rune Botten
    Rune Botten

    Namespacing, in the pure sense, went out the window, since all hidden elements get tagged with rails-hidden-*inputs*. But as far as I can see, all hidden elements generated by rails are input fields. As least as far as the tests go. Its a hack, I know. I needed something bite-size to poke my fingers at.

    July 17th, 2008 @ 05:59 PM

  6. josh
    josh
    • State changed from open to stale

    Staling out, please reopen if this is still a problem.

    October 28th, 2008 @ 04:26 PM