Skip to content

Instantly share code, notes, and snippets.

@JohnLockwood
Created November 10, 2012 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JohnLockwood/4051775 to your computer and use it in GitHub Desktop.
Save JohnLockwood/4051775 to your computer and use it in GitHub Desktop.
A sample application.html.haml file, based on the application.html.erb from ruby-devise-mongoid.
!!!
%head
%title= content_for?(:title) ? yield(:title) : I18n.t("site_title")
%meta{:name => "description", :content=> "#{ content_for?(:description) ? yield(:description) : (I18n.t "site_description")}"}
%meta{:charset => "utf-8"}
%meta{:author => "John Lockwood"}
=stylesheet_link_tag "application", :media => "all"
=javascript_include_tag "application"
=csrf_meta_tags
= yield(:head)
%body
#container.container
%header
= render 'layouts/navigation'
= render 'layouts/messages'
#main{:role => "main"}
= yield
%footer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment