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.

Improve HTML generated by Scaffold

#2624

This patch improves the HTML code generated by scaffold including all elements within <p></p>. This markup is HTML Strict valid.

for example, in show.html.erb the actual scaffold generates


<%= link_to 'Back', posts_path %>

and with this patch, the result is


<p><%= link_to 'Back', posts_path %></p>

This patch affects: index.html.erb, show.html.erb, edit.html.erb and new.html.erb

Reported by Emili ParreƱo · May 8th, 2009 @ 07:49 AM

State: duplicate
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Yaroslav Markin
    Yaroslav Markin

    You should probably use div for that — more generic.

    May 8th, 2009 @ 01:09 PM

  2. Daniel Schierbeck
    Daniel Schierbeck

    Yaroslav: I disagree; this seems like perfectly correct use of the paragraph element type.

    +1 from me; I think it's a good idea to use semantically correct XHTML.

    May 8th, 2009 @ 01:18 PM

  3. Ken Collins
    Ken Collins

    DIV is way more appropriate. I hate seeing

    tags for block level element usage.

    May 8th, 2009 @ 02:24 PM

  4. CancelProfileIsBroken
    CancelProfileIsBroken
    • State changed from new to duplicate

    See ticket #1760 where these issues are already being discussed.

    May 8th, 2009 @ 03:13 PM