Forum: Ruby on Rails Layout for a module

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1c6c693bb162eb28d0f30acfc83d5b42?d=identicon&s=25 Greg Moreno (Guest)
on 2005-12-29 06:58
Hi,

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?

Thanks.
2dd904ec5981c31e7bb7a5743a53caf8?d=identicon&s=25 Bruce Balmer (brucebalmer)
on 2005-12-29 15:00
(Received via mailing list)
Greg:

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.

bruce
This topic is locked and can not be replied to.