Forum: Ruby on Rails Layout for a module

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Greg Moreno (Guest)
on 2005-12-29 07:58

I have several controllers under 1 module. What I want to achieve is to
use a layout that all controllers will use.  AFAIK in Rails, I can only
define a layout for a controller, and not for a module. Is it possible
to define a layout for a module?

Bruce B. (Guest)
on 2005-12-29 16:00
(Received via mailing list)

I don't know what a "module' is.  But you can define one layout for
all controllers in an app  by naming it 'application.rhtml and
placing it at the root level of the layouts folder.  You must then
not have individual layouts defined by controller or the application.
rhtml file will be overridden.  Hope that helps.

This topic is locked and can not be replied to.