Rails has the ability to share layouts between controllers,
primarily by repeating "layout 'application'" in each controller.
This isn't very DRY.
Common techniques to refactor this out (such as inheritance) are
thwarted by the fact that scaffold generator produces a new layout
for each controller, and such (often unwanted) templates will be
chosen first, over the expressed wishes of the superclass. This
behavior is surprising and complicates teaching. Agile Web
Development with Rails, Edition 3, for example, has taken the
approach of establishing a common layout for the Depot application
and then instructing the reader to delete the generated layout
after each and every call to the scaffold generator.
My suggestion is that Rails::Generators::AppGenerator produce a
single layout based on the application name and reference it in
application_controller. This may create migration concerns, so
perhaps scaffold_generator should continue to produce
controller-specific layouts, but only if
ApplicationController.instance_eval('@_layout') is nil.
I'm willing to write patches, test the code, whatever; but first
I'm seeking agreement on what the desired behavior should be.