On Thu, Dec 01, 2005 at 09:35:30PM -0700, Bruce B. wrote:
If I have four controllers and I want them to use a common layout, I
believe there is a way to do that, I read about it once. To have one
layout that covers all the controllers in an application.
Could someone kindly tell me how that is done? do you create a
single rhtml file called application. rhtml and drop it at the root
level of the view controller?
Yes, create a layout called application.rhtml. The conventions for
among several, include looking for a layout with the same name as the
controller. Then, looking for one called application.rhtml. Put it in
app/views/layouts. If you go off of the naming convention then you must
use the “layout” macro in your controller.