Skip to content
Browse files

Removed mentions of controller specific layouts. Ticket Ref: http://b…

  • Loading branch information...
1 parent 606bed1 commit a5955196f2ed8a69c49a1a8c0c617ab91cb8d716 @rohit rohit committed Apr 24, 2010
Showing with 5 additions and 6 deletions.
  1. +5 −6 railties/guides/source/getting_started.textile
View
11 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:
<erb>
<!DOCTYPE html>
<html>
<head>
- <title>Posts: <%= controller.action_name %></title>
- <%= stylesheet_link_tag 'scaffold' %>
+ <title>Blog</title>
+ <%= stylesheet_link_tag :all %>
+ <%= javascript_include_tag :defaults %>
+ <%= csrf_meta_tag %>
</head>
<body style="background: #EEEEEE;">
-<p class="notice"><%= notice %></p>
-
<%= yield %>
</body>

0 comments on commit a595519

Please sign in to comment.
Something went wrong with that request. Please try again.