@@ -906,7 +906,7 @@ So first, we'll wire up the Post show template (+/app/views/posts/show.html.erb+
Add a comment:
-<% form_for([@post, @post.comments.build]) do |f| %>
+<%= form_for([@post, @post.comments.build]) do |f| %>
<%= f.error_messages %>
@@ -1041,7 +1041,7 @@ Then in the +app/views/posts/show.html.erb+ you can change it to look like the f
:collection => @post.comments %>
Add a comment:
-<% form_for([@post, @post.comments.build]) do |f| %>
+<%= form_for([@post, @post.comments.build]) do |f| %>
<%= f.error_messages %>
@@ -1070,7 +1070,7 @@ h4. Rendering a Partial Form
Lets also move that new comment section out to it's own partial, again, you create a file +app/views/comments/_form.html.erb+ and in it you put:
-<% form_for([@post, @post.comments.build]) do |f| %>
+<%= form_for([@post, @post.comments.build]) do |f| %>
<%= f.error_messages %>
@@ -1278,7 +1278,7 @@ We will modify +views/posts/_form.html.erb+ to render a partial to make a tag:
<% @post.tags.build %>
-<% form_for(@post) do |post_form| %>
+<%= form_for(@post) do |post_form| %>
<%= post_form.error_messages %>