Hello all, I just found out that I could set a default layout for my pages. However, I''ve already created dozens of pages that don''t use that default layout. What would be the easiest way to get these pages into the new scheme? I''ve done very little layout work on them, would it be easiest to simply regenerate them? Thanks, Will Gant --------------------------------- How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Dear Will: If I understood your question properly, you are saying that before discovering layouts, you have a bunch of pages like: <html> <head><title>My page title</title></head> <body> </body> </html> and now you have discovered that creating application.rhtml in the layouts directory will give you a layout you can use on any page, something like: <html> <head><title><%= @page_title %></title> <body> <%= @content_for_layout %> </body> </html> I think the best thing to do is to use two tools.... source control and a file comparison utility like Beyond Compare. Source control so you can always rollback changes if things don''t look like, and beyond compare to make sure you have captured everything.... From looking at AWDWR 1st ed, p. 370, another thing you might want to do is create new controllers for where all these new views are going to go, and you might want to use the controller syntax described to prevent the layout from being applied in your existing pages... That is, if your controller you write: layout "mylayout", :except =>[:action1, :action2] Then all your pages except those listed in the array will use the layout. You could use this mechanism as you update each page - that is, make sure the layout not being applied, change the page, then apply the layout... Hope this helps! Dominique Will Gant wrote:> Hello all, > I just found out that I could set a default layout for my pages. > However, I''ve already created dozens of pages that don''t use that > default layout. What would be the easiest way to get these pages into > the new scheme? I''ve done very little layout work on them, would it be > easiest to simply regenerate them? > > Thanks, > Will Gant > > > --------------------------------- > How low will we go? Check out Yahoo! Messengers low PC-to-Phone call > rates.-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks, that fixed it. Dominique Plante <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: Dear Will: If I understood your question properly, you are saying that before discovering layouts, you have a bunch of pages like: My page title and now you have discovered that creating application.rhtml in the layouts directory will give you a layout you can use on any page, something like: <%= @page_title %> <%= @content_for_layout %> I think the best thing to do is to use two tools.... source control and a file comparison utility like Beyond Compare. Source control so you can always rollback changes if things don''t look like, and beyond compare to make sure you have captured everything.... From looking at AWDWR 1st ed, p. 370, another thing you might want to do is create new controllers for where all these new views are going to go, and you might want to use the controller syntax described to prevent the layout from being applied in your existing pages... That is, if your controller you write: layout "mylayout", :except =>[:action1, :action2] Then all your pages except those listed in the array will use the layout. You could use this mechanism as you update each page - that is, make sure the layout not being applied, change the page, then apply the layout... Hope this helps! Dominique Will Gant wrote:> Hello all, > I just found out that I could set a default layout for my pages. > However, I''ve already created dozens of pages that don''t use that > default layout. What would be the easiest way to get these pages into > the new scheme? I''ve done very little layout work on them, would it be > easiest to simply regenerate them? > > Thanks, > Will Gant > > > --------------------------------- > How low will we go? Check out Yahoo! Messengers low PC-to-Phone call > rates.-- Posted via http://www.ruby-forum.com/. --------------------------------- Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---