Permalink
Browse files

[getting started] explain :as option

  • Loading branch information...
1 parent 146105a commit 53aaf95855b3e9bdcc834e906042c7dc0ca446c3 @radar radar committed May 17, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 guides/source/getting_started.textile
@@ -1058,7 +1058,10 @@ line like this:
get "posts/:id" => "posts#show", :as => :post
</ruby>
-Now you'll be able to update posts again.
+The +:as+ option tells the +get+ method that we want to make routing helpers
+called +post_url+ and +post_path+ available to our application. These are
+precisely the methods that the +form_for+ needs when editing a post, and so now
+you'll be able to update posts again.
h4. Deleting Posts

0 comments on commit 53aaf95

Please sign in to comment.