As I am upgrading one of our projects to rails3 right now, I had to deal with lots of obsolete and not longer working code. And I came across this little gem I picked up from Pratik Naik. It allows you to nest your layouts pretty easily. If you upgrade to rails3 you have to change the code to:
def parent_layout(layout)
@_content_for[:layout] = self.output_buffer
self.output_buffer = render(:file => "layouts/#{layout}")
end
RubyOnRails does no longer use multiple instance variables to store the contents, but a single hash.