Permalink
Browse files

getting started guide: pass the resource to the URL helper [ci skip]

Passing the actual ID is not idiomatic.
  • Loading branch information...
1 parent 1ad7e12 commit 538bd3633bd4dc1a32eabdc71d8d2a3ed7b72812 @fxn fxn committed Aug 5, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 guides/source/getting_started.md
View
2 guides/source/getting_started.md
@@ -888,7 +888,7 @@ it look as follows:
```html+erb
<h1>Editing post</h1>
-<%= form_for :post, url: post_path(@post.id), method: :patch do |f| %>
+<%= form_for :post, url: post_path(@post), method: :patch do |f| %>
<% if @post.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@post.errors.count, "error") %> prohibited

0 comments on commit 538bd36

Please sign in to comment.