Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 8cfde229ddfbc22d83a84c46c423eefbe49bb694 1 parent dd3ee84
Ryan Bigg authored May 16, 2012

Showing 1 changed file with 8 additions and 8 deletions. Show diff stats Hide diff stats

  1. 16  guides/source/getting_started.textile
16  guides/source/getting_started.textile
Source Rendered
@@ -977,23 +977,23 @@ content:
977 977
 <% end %>
978 978
 </erb>
979 979
 
980  
-Everything except for the +form_for+ declaration remained the same. I'll
981  
-explain later how +form_for+ can figure out the right +action+ and
982  
-+method+ attributes when building the form, for now let's update the
983  
-+new+ and +edit+ views:
  980
+Everything except for the +form_for+ declaration remained the same.
  981
+How +form_for+ can figure out the right +action+ and +method+ attributes
  982
+when building the form will be explained in just a moment. For now, let's update the
  983
++app/views/posts/new.html.erb+ view to use this new partial, rewriting it
  984
+completely:
984 985
 
985 986
 <erb>
986  
-# app/views/posts/new.html.erb
987  
-
988 987
 <h1>New post</h1>
989 988
 
990 989
 <%= render 'form' %>
991 990
 
992 991
 <%= link_to 'Back', :action => :index %>
  992
+</erb>
993 993
 
  994
+Then do the same for the +app/views/posts/edit.html.erb+ view:
994 995
 
995  
-# app/views/posts/edit.html.erb
996  
-
  996
+<erb>
997 997
 <h1>Edit post</h1>
998 998
 
999 999
 <%= render 'form' %>

0 notes on commit 8cfde22

Please sign in to comment.
Something went wrong with that request. Please try again.