Where is the controller's default view template?


When I moved from Rail 1.2 to 2.0.2, "script/generate controller xxx" stopped creating a default layout template in app/view/layouts/. But the code still works and likely gets a default template for the controller from somewhere.

Can someone say where this template is stored?

When I want to change something in the controller template, I have to copy a template from one of my older projects where this template was generated with pre-2.0 Rails. Is there a better way?

Thanks for any info.


the default template is app/view/layouts/application.html.erb

Greetings Johannes

Really? I could not find this file in my workspaces. I tried creating a fresh project and a fresh controller with Rails 2.1.1. It does not create application.html.erb anywhere in my workspace. Perhaps the file is elsewhere?

I did find layout.html.erb in my Rails install directory which appears close to what I would expect from a default view template. I found it here: lib/ruby/gems/1.8/gems/rails-2.1.1/lib/rails_generator/generators/ components/scaffold/templates/layout.html.erb

Can anyone confirm that that's where we need to go to get a default controller view template? Or maybe there is a "script/generate default_layout" kind of command to create this in a workspace?