public
Created

allow you nest you layout in rails application

  • Download Gist
parent_layout_helper.rb
Ruby
1 2 3 4 5
#nested layout.
def parent_layout(layout)
@_content_for[:layout] = self.output_buffer
self.output_buffer = render(:file => "layouts/#{layout}")
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.