I have several controllers for doing simple editing of some lists in my
application (like roles, responsibilities, etc), but I want to use the
same layout from my main ‘member’ controller for everything. How do I
link em up?
If you want every single page in the whole app to use the same layout,
you
can make one called “application.rhtml” and then you can remove all
other
layouts and every controller will use that layout by default.
Or you can specify a layout at the controller level
class MyController < ApplicationController
layout “public”
end
Or per action
def list
render :layout=>“public”
end
I use application.rhtml as my main layout and then override it in
controllers when I want to change it.
Brilliant! Thanks, I knew it couldn’t be too complicated.