Last active
November 6, 2016 00:31
-
-
Save jcypret/7b269831df8abb11c238d2058a84ee11 to your computer and use it in GitHub Desktop.
Rails helper method for building nested layouts. https://justincypret.com/nested-layouts-in-rails/
This file contains 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
def inside_layout(layout = "application", &block) | |
render inline: capture(&block), layout: "layouts/#{layout}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment