From a5955196f2ed8a69c49a1a8c0c617ab91cb8d716 Mon Sep 17 00:00:00 2001 From: Rohit Arondekar Date: Sat, 24 Apr 2010 21:51:25 -0700 Subject: Removed mentions of controller specific layouts. Ticket Ref: http://bit.ly/9dqvBI --- railties/guides/source/getting_started.textile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'railties') diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index 8538d38374..6052ac737a 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -363,7 +363,6 @@ The scaffold generator will build 15 files in your application, along with some |app/views/posts/show.html.erb |A view to display a single post| |app/views/posts/new.html.erb |A view to create a new post| |app/views/posts/_form.html.erb |A partial to control the overall look and feel of the form used in edit and new views| -|app/views/layouts/posts.html.erb |A view to control the overall look and feel of the other post views| |app/helpers/posts_helper.rb |Helper functions to be used from the post views| |test/unit/post_test.rb |Unit testing harness for the posts model| |test/functional/posts_controller_test.rb |Functional testing harness for the posts controller| @@ -551,19 +550,19 @@ TIP: For more details on the rendering process, see "Layouts and Rendering in Ra h4. Customizing the Layout -The view is only part of the story of how HTML is displayed in your web browser. Rails also has the concept of +layouts+, which are containers for views. When Rails renders a view to the browser, it does so by putting the view's HTML into a layout's HTML. The +rails generate scaffold+ command automatically created a default layout, +app/views/layouts/posts.html.erb+, for the posts. Open this layout in your editor and modify the +body+ tag: +The view is only part of the story of how HTML is displayed in your web browser. Rails also has the concept of +layouts+, which are containers for views. When Rails renders a view to the browser, it does so by putting the view's HTML into a layout's HTML. In previous versions of Rails, the +rails generate scaffold+ command would automatically create a controller specific layout, like +app/views/layouts/posts.html.erb+, for the posts controller. However this has been changed in Rails 3.0. A application specific +layout+ is used for all the controllers and can be found in +app/views/layouts/application.html.erb+. Open this layout in your editor and modify the +body+ tag: - Posts: <%= controller.action_name %> - <%= stylesheet_link_tag 'scaffold' %> + Blog + <%= stylesheet_link_tag :all %> + <%= javascript_include_tag :defaults %> + <%= csrf_meta_tag %> -

<%= notice %>

- <%= yield %> -- cgit v1.2.3