Skip to content

Instantly share code, notes, and snippets.

@yorzi
Created March 18, 2011 07: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 yorzi/875721 to your computer and use it in GitHub Desktop.
Save yorzi/875721 to your computer and use it in GitHub Desktop.
allow you nest you layout in rails application
#nested layout.
def parent_layout(layout)
@_content_for[:layout] = self.output_buffer
self.output_buffer = render(:file => "layouts/#{layout}")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment