Skip to content

Instantly share code, notes, and snippets.

@airblade
Created April 7, 2011 10:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save airblade/907555 to your computer and use it in GitHub Desktop.
Save airblade/907555 to your computer and use it in GitHub Desktop.
Nested layouts with HAML in Rails 3
module ApplicationHelper
def inside_layout(layout = 'application', &block)
render :inline => capture_haml(&block), :layout => "layouts/#{layout}"
end
end
= inside_layout do
...
= inside_layout 'some_inner_layout' do
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment