sharing layouts between controllers

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”


Or per action

def list render :layout=>“public”


I use application.rhtml as my main layout and then override it in controllers when I want to change it.