aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2012-05-16 18:10:55 +1000
committerRyan Bigg <radarlistener@gmail.com>2012-05-16 18:10:55 +1000
commit8cfde229ddfbc22d83a84c46c423eefbe49bb694 (patch)
tree570bcf2f49307c632e5348adf7eed8c9d3079109 /guides
parentdd3ee84cd842a11be253e2fe2f29b45232fdb2c6 (diff)
downloadrails-8cfde229ddfbc22d83a84c46c423eefbe49bb694.tar.gz
rails-8cfde229ddfbc22d83a84c46c423eefbe49bb694.tar.bz2
rails-8cfde229ddfbc22d83a84c46c423eefbe49bb694.zip
[getting started] Split up refactoring of new and edit templates
Diffstat (limited to 'guides')
-rw-r--r--guides/source/getting_started.textile16
1 files changed, 8 insertions, 8 deletions
diff --git a/guides/source/getting_started.textile b/guides/source/getting_started.textile
index 0456abebb7..40c3303b07 100644
--- a/guides/source/getting_started.textile
+++ b/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' %>