Is it possible to automatically assign a specified layout template to a particular controller and all of the resources nested within it, as specified in routes.rb? This layout should apply only the specified controller views and those nested within it; it does not need to be applied to every view within the application, as application.html.erb would (I'm actually using the specialized layout with the application layout for a nested layout).
So, for example, if I had
map.resources :news, :shallow => true do |n|
n.resources :articles do |a|
a.resources :comments
end
end
when I visit a url like localhost/news/1/articles/new
I should see my news.html.erb
layout in action. As of now, I don't.
I obviously don't want to recreate the same layout file for each controller nested within the parent (even if I would pull out the meat the layout and put it in a shared partial). I'm even less thrilled about specifying the layout template in the specific controllers themselves (this specific example is kind of a temporary thing, though I will have a 'real' use-case for this a bit further down the road).
Thanks!