aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/layouts_and_rendering.md
diff options
context:
space:
mode:
authorJohn Kelly Ferguson <hello@johnkellyferguson.com>2014-05-21 21:47:18 -0400
committerJohn Kelly Ferguson <hello@johnkellyferguson.com>2014-05-21 23:01:45 -0400
commitd02c810e29080389ab26313ae75556081aa9ac63 (patch)
treeb1b7d6e6d9fb411281453708ec09adc28b46152e /guides/source/layouts_and_rendering.md
parent2fb2913b35c4a706f0207119ab0b3e89f61546a1 (diff)
downloadrails-d02c810e29080389ab26313ae75556081aa9ac63.tar.gz
rails-d02c810e29080389ab26313ae75556081aa9ac63.tar.bz2
rails-d02c810e29080389ab26313ae75556081aa9ac63.zip
Rename Posts to Articles in Guides, continuation of 2d446e77 / #13774 [ci skip]
Diffstat (limited to 'guides/source/layouts_and_rendering.md')
-rw-r--r--guides/source/layouts_and_rendering.md24
1 files changed, 12 insertions, 12 deletions
diff --git a/guides/source/layouts_and_rendering.md b/guides/source/layouts_and_rendering.md
index bd33c5a146..5b75540c05 100644
--- a/guides/source/layouts_and_rendering.md
+++ b/guides/source/layouts_and_rendering.md
@@ -506,33 +506,33 @@ Layout declarations cascade downward in the hierarchy, and more specific layout
end
```
-* `posts_controller.rb`
+* `articles_controller.rb`
```ruby
- class PostsController < ApplicationController
+ class ArticlesController < ApplicationController
end
```
-* `special_posts_controller.rb`
+* `special_articles_controller.rb`
```ruby
- class SpecialPostsController < PostsController
+ class SpecialArticlesController < ArticlesController
layout "special"
end
```
-* `old_posts_controller.rb`
+* `old_articles_controller.rb`
```ruby
- class OldPostsController < SpecialPostsController
+ class OldArticlesController < SpecialArticlesController
layout false
def show
- @post = Post.find(params[:id])
+ @article = Article.find(params[:id])
end
def index
- @old_posts = Post.older
+ @old_articles = Article.older
render layout: "old"
end
# ...
@@ -542,10 +542,10 @@ Layout declarations cascade downward in the hierarchy, and more specific layout
In this application:
* In general, views will be rendered in the `main` layout
-* `PostsController#index` will use the `main` layout
-* `SpecialPostsController#index` will use the `special` layout
-* `OldPostsController#show` will use no layout at all
-* `OldPostsController#index` will use the `old` layout
+* `ArticlesController#index` will use the `main` layout
+* `SpecialArticlesController#index` will use the `special` layout
+* `OldArticlesController#show` will use no layout at all
+* `OldArticlesController#index` will use the `old` layout
#### Avoiding Double Render Errors