This project is archived and is in readonly mode.
form authentication interfering with page layout
Reported by Kevin Chiu | July 16th, 2008 @ 12:40 AM | in 2.x
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.
Comments and changes to this ticket
-
Rick July 16th, 2008 @ 12:58 AM
- 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
? -
Kevin Chiu July 16th, 2008 @ 01:10 AM
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:
-
Rune Botten July 17th, 2008 @ 05:49 PM
- no changes were found...
-
Rune Botten July 17th, 2008 @ 05:49 PM
- 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.
-
Rune Botten July 17th, 2008 @ 05:59 PM
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.
-
josh October 28th, 2008 @ 04:26 PM
- State changed from open to stale
Staling out, please reopen if this is still a problem.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>