Hi, 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. =sudhir. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Johannes J. Schmidt
2008-Sep-24 09:53 UTC
Re: Where is the controller''s default view template?
Am Dienstag, den 23.09.2008, 15:34 -0700 schrieb Sudhir:> 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?the default template is app/view/layouts/application.html.erb Greetings Johannes --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Sep 24, 2:53 am, "Johannes J. Schmidt" <d...-xIc/GT63x2dWk0Htik3J/w@public.gmane.org> wrote:> Am Dienstag, den 23.09.2008, 15:34 -0700 schrieb Sudhir:> the default template is app/view/layouts/application.html.erb >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? Thanks. =sudhir. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---