1. Play-By-Play: Layout

    July 9, 2010 by Craig

    I want to use HAML for my templates. I already have it installed; all I need to do now is convert the scaffolded ERB layout.

    html2haml app/views/layouts/application.html.erb app/views/layouts/application.haml
    

    One other thing I like to do is have the <title> and topmost <h1> tags have the same content. This is generally considered (by the SEO black-magicians) to be good SEO practice. It’s easily achieved by having a @page_title variable set by each view, and then by having the layout display it in title and header.