Skip to content

Commit

Permalink
Merge pull request #12356 from francisgo/patch-3
Browse files Browse the repository at this point in the history
Getting Started Guide: posts_controller -> PostsController [ci skip]
  • Loading branch information
senny committed Sep 26, 2013
2 parents 66c300c + f2f84cd commit 3f2ebf2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions guides/source/getting_started.md
Expand Up @@ -687,7 +687,7 @@ invoking the command: `rake db:migrate RAILS_ENV=production`.

### Saving data in the controller

Back in `posts_controller`, we need to change the `create` action
Back in `PostsController`, we need to change the `create` action
to use the new `Post` model to save the data in the database. Open `app/controllers/posts_controller.rb`
and change the `create` action to look like this:

Expand Down Expand Up @@ -1013,7 +1013,7 @@ errors with `@post.errors.full_messages`.
arguments. If the number is greater than one, the string will be automatically
pluralized.

The reason why we added `@post = Post.new` in `posts_controller` is that
The reason why we added `@post = Post.new` in the `PostsController` is that
otherwise `@post` would be `nil` in our view, and calling
`@post.errors.any?` would throw an error.

Expand All @@ -1031,7 +1031,7 @@ attempt to do just that on the new post form [(http://localhost:3000/posts/new)]
We've covered the "CR" part of CRUD. Now let's focus on the "U" part, updating
posts.

The first step we'll take is adding an `edit` action to `posts_controller`.
The first step we'll take is adding an `edit` action to the `PostsController`.

```ruby
def edit
Expand Down

0 comments on commit 3f2ebf2

Please sign in to comment.