Permalink
Browse files

[getting started] Split up refactoring of new and edit templates

  • Loading branch information...
1 parent dd3ee84 commit 8cfde229ddfbc22d83a84c46c423eefbe49bb694 @radar radar committed May 16, 2012
Showing with 8 additions and 8 deletions.
  1. +8 −8 guides/source/getting_started.textile
@@ -977,23 +977,23 @@ content:
<% end %>
</erb>
-Everything except for the +form_for+ declaration remained the same. I'll
-explain later how +form_for+ can figure out the right +action+ and
-+method+ attributes when building the form, for now let's update the
-+new+ and +edit+ views:
+Everything except for the +form_for+ declaration remained the same.
+How +form_for+ can figure out the right +action+ and +method+ attributes
+when building the form will be explained in just a moment. For now, let's update the
++app/views/posts/new.html.erb+ view to use this new partial, rewriting it
+completely:
<erb>
-# app/views/posts/new.html.erb
-
<h1>New post</h1>
<%= render 'form' %>
<%= link_to 'Back', :action => :index %>
+</erb>
+Then do the same for the +app/views/posts/edit.html.erb+ view:
-# app/views/posts/edit.html.erb
-
+<erb>
<h1>Edit post</h1>
<%= render 'form' %>

0 comments on commit 8cfde22

Please sign in to comment.