From 8cfde229ddfbc22d83a84c46c423eefbe49bb694 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Wed, 16 May 2012 18:10:55 +1000 Subject: [getting started] Split up refactoring of new and edit templates --- guides/source/getting_started.textile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'guides') 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 %> -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: -# app/views/posts/new.html.erb -

New post

<%= render 'form' %> <%= link_to 'Back', :action => :index %> +
+Then do the same for the +app/views/posts/edit.html.erb+ view: -# app/views/posts/edit.html.erb - +

Edit post

<%= render 'form' %> -- cgit v1.2.3