diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2013-04-11 22:58:14 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2013-04-11 22:58:14 +0530 |
commit | b15ce4a006756a0b6cacfb9593d88c9a7dfd8eb0 (patch) | |
tree | 573c2401b48841a28209e93664af131146eea31e /guides/source/getting_started.md | |
parent | a24ef8611d19bce9c98aa21ee59d9dd0a08ecec5 (diff) | |
parent | 8a347d925d08a4fe648c6fe7c5e8c948e186c9bb (diff) | |
download | rails-b15ce4a006756a0b6cacfb9593d88c9a7dfd8eb0.tar.gz rails-b15ce4a006756a0b6cacfb9593d88c9a7dfd8eb0.tar.bz2 rails-b15ce4a006756a0b6cacfb9593d88c9a7dfd8eb0.zip |
Merge branch 'master' of github.com:lifo/docrails
Conflicts:
guides/source/action_mailer_basics.md
Diffstat (limited to 'guides/source/getting_started.md')
-rw-r--r-- | guides/source/getting_started.md | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index 3881bb1195..d49a30d02f 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -1043,7 +1043,7 @@ REST convention, so to create a new `Post` object it will look for a route named `posts_path`, and to update a `Post` object it will look for a route named `post_path` and pass the current object. Similarly, rails knows that it should create new objects via POST and update them via -PUT. +PATCH. 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 when we @@ -1054,13 +1054,13 @@ received an error before. With your server running you can view your routes by v ```bash $ rake routes - posts GET /posts(.:format) posts#index -posts_new GET /posts/new(.:format) posts#new - POST /posts(.:format) posts#create - GET /posts/:id(.:format) posts#show - GET /posts/:id/edit(.:format) posts#edit - PUT /posts/:id(.:format) posts#update - root / welcome#index + posts GET /posts(.:format) posts#index +posts_new GET /posts/new(.:format) posts#new + POST /posts(.:format) posts#create + GET /posts/:id(.:format) posts#show + GET /posts/:id/edit(.:format) posts#edit + PATCH /posts/:id(.:format) posts#update + root / welcome#index ``` To fix this, open `config/routes.rb` and modify the `get "posts/:id"` @@ -1197,6 +1197,7 @@ $ rake routes new_post GET /posts/new(.:format) posts#new edit_post GET /posts/:id/edit(.:format) posts#edit post GET /posts/:id(.:format) posts#show + PATCH /posts/:id(.:format) posts#update PUT /posts/:id(.:format) posts#update DELETE /posts/:id(.:format) posts#destroy root / welcome#index |