Half of them require one type of layout, the other half requires
another type of layout.
right now, the first half of my views uses the application.html.erb
Now, there are another bunch of views. How can I assign them all to
application2.html.erb??
I don’t want to assign a seperate layout for each of the controllers,
and application.html.erb is already used. thanks
Assuming that your views / layouts are specific to controllers, one way to handle this is to have you controllers inherit from a ‘child’ of ApplicationController Pseudocode follows.
ApplicationControllerForLayoutOne << ApplicationController
layout :layout1
end
OneController < ApplicationControllerForLayoutOne
end