Skip to content

Instantly share code, notes, and snippets.

@bwiggs
Created July 29, 2013 16:25
Show Gist options
  • Save bwiggs/6105567 to your computer and use it in GitHub Desktop.
Save bwiggs/6105567 to your computer and use it in GitHub Desktop.
Can't get nested layouts working in Rails 3
= render template: "layouts/sub_layout"
- content_for :content_body
h3 'action.html.slim'
h1 application.html.slim
= content_for?(:content) ? yield(:content) : yield
h2 sub_layout.html.slim
= content_for?(:copy) ? yield(:copy) : yield
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment