Skip to content

Commit

Permalink
[getting started] explain that posts_path exists due to how we define…
Browse files Browse the repository at this point in the history
…d routes earlier
  • Loading branch information
radar committed May 16, 2012
1 parent 8cfde22 commit 950a7b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions guides/source/getting_started.textile
Original file line number Diff line number Diff line change
Expand Up @@ -1001,8 +1001,7 @@ Then do the same for the +app/views/posts/edit.html.erb+ view:
<%= link_to 'Back', :action => :index %>
</erb>

Point your browser to
"http://localhost:3000/posts/new":http://localhost:3000/posts/new and
Point your browser to "http://localhost:3000/posts/new":http://localhost:3000/posts/new and
try creating a new post. Everything still works. Now try editing the
post and you'll receive the following error:

Expand All @@ -1020,7 +1019,8 @@ knows that it should create new objects via POST and update them via
PUT.

If you run +rake routes+ from the console you'll see that we already
have a +posts_path+ route, which was created automatically by Rails.
have a +posts_path+ route, which was created automatically by Rails when we
defined the route for the index action.
However, we don't have a +post_path+ yet, which is the reason why we
received an error before.

Expand Down

0 comments on commit 950a7b4

Please sign in to comment.