Created
July 29, 2013 16:25
-
-
Save bwiggs/6105567 to your computer and use it in GitHub Desktop.
Can't get nested layouts working in Rails 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= render template: "layouts/sub_layout" | |
- content_for :content_body | |
h3 'action.html.slim' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1 application.html.slim | |
= content_for?(:content) ? yield(:content) : yield |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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