rails/rails — pull request #15215 by JohnKellyFerguson (2014-05-21 03:33:56+00:00)
Title: Documentation: Rename Posts to Articles

Within the documentation, it can be confusing for novices when post is used to describe different models, views or controllers, since it also refers to an HTTP verb.

This is particularly true in the [Testing section](https://github.com/rails/rails/blob/master/guides/source/testing.md) of the guides, which contains examples like this:

> ```ruby
test "should create post" do
assert_difference('Post.count') do
post :create, post: {title: 'Some title'}
end
>
assert_redirected_to post_path(assigns(:post))
end
```

In the above, it is not immediately clear how the posts in `post :create, post: {title: 'Some title'}` differ. A novice may not pick up that one is the HTTP request method while the other refers to the post parameters.

This is also the case in the [Routing section](https://github.com/rails/rails/blob/master/guides/source/routing.md) of the guides, which has the following information:

> In each of these cases, the named routes remain the same as if you did not use `scope`. In the last case, the following paths map to `PostsController`:

> | HTTP Verb | Path | Controller#Action | Named Helper |
| --------- | --------------------- | ----------------- | ------------------- |
| GET | /admin/posts | posts#index | posts_path |
| GET | /admin/posts/new | posts#new | new_post_path |
| POST | /admin/posts | posts#create | posts_path |
| GET | /admin/posts/:id | posts#show | post_path(:id) |
| GET | /admin/posts/:id/edit | posts#edit | edit_post_path(:id) |
| PATCH/PUT | /admin/posts/:id | posts#update | post_path(:id) |
| DELETE | /admin/posts/:id | posts#destroy | post_path(:id) |

In the above example, there can be some unnecessary confusion for a reader about the relationship between the HTTP verb POST and the path or controller#action.

Similar examples such as the above can be found throughout the guides.

To address this potential confusion and provide greater clarity, I have renamed all of the appropriate non-HTTP verb uses of `post` to `article`. For the purposes of consistency, I did this renaming throughout the guides, even in places where there would not be any potential confusion, such as the sections about ActiveRecord, etc.

Lastly, in the current [Getting Started section](https://github.com/rails/rails/blob/master/guides/source/getting_started.md) of the guides, `Article` is used instead of `Post`, and so acts as a bit of a precedent for preferring one over the other.