diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-08-03 21:37:47 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-08-03 21:37:47 -0300 |
commit | f6a735ea05279b838f79041647564b30f26565ce (patch) | |
tree | b82479da9625f97d87a932f124dc098afcf01968 /guides/source | |
parent | 8ff3fe2e937d988e99c72357dce1b11418b7e386 (diff) | |
download | rails-f6a735ea05279b838f79041647564b30f26565ce.tar.gz rails-f6a735ea05279b838f79041647564b30f26565ce.tar.bz2 rails-f6a735ea05279b838f79041647564b30f26565ce.zip |
:scissors:
[ci skip]
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/getting_started.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index 6d73163b9a..20d7eb3381 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -416,7 +416,7 @@ edit_post GET /posts/:id/edit(.:format) posts#edit The `posts_path` helper tells Rails to point the form to the URI Pattern associated with the `posts` prefix; and the form will (by default) send a `POST` request -to that route. This is associated with the +to that route. This is associated with the `create` action of the current controller, the `PostsController`. With the form and its associated route defined, you will be able to fill in the form and then click the submit button to begin the process of creating a new post, so go ahead and do that. When you submit the form, you should see a familiar error: @@ -553,7 +553,7 @@ and change the `create` action to look like this: ```ruby def create @post = Post.new(params[:post]) - + @post.save redirect_to @post end @@ -1039,7 +1039,7 @@ content: ``` Everything except for the `form_for` declaration remained the same. -The reason we can use this shorter, simpler `form_for` declaration +The reason we can use this shorter, simpler `form_for` declaration to stand in for either of the other forms is that `@post` is a *resource* corresponding to a full set of RESTful routes, and Rails is able to infer which URI and method to use. |