diff options
author | Rohit Arondekar <rohit.arondekar@gmail.com> | 2010-04-24 21:51:25 -0700 |
---|---|---|
committer | Rohit Arondekar <rohit.arondekar@gmail.com> | 2010-04-24 21:51:25 -0700 |
commit | a5955196f2ed8a69c49a1a8c0c617ab91cb8d716 (patch) | |
tree | 91aa5bf2f756f23daa5e33aa8b44bd4c335c82af /railties | |
parent | 606bed1a77e0a0a2baf81d1866c66100de443701 (diff) | |
download | rails-a5955196f2ed8a69c49a1a8c0c617ab91cb8d716.tar.gz rails-a5955196f2ed8a69c49a1a8c0c617ab91cb8d716.tar.bz2 rails-a5955196f2ed8a69c49a1a8c0c617ab91cb8d716.zip |
Removed mentions of controller specific layouts. Ticket Ref: http://bit.ly/9dqvBI
Diffstat (limited to 'railties')
-rw-r--r-- | railties/guides/source/getting_started.textile | 11 |
1 files changed, 5 insertions, 6 deletions
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: <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> |