diff options
author | Les Nightingill <codehacker@comcast.net> | 2012-04-25 09:40:43 -0700 |
---|---|---|
committer | Les Nightingill <codehacker@comcast.net> | 2012-04-25 09:40:43 -0700 |
commit | a2fac64fb91c426f64b687270117e956fb77cff6 (patch) | |
tree | b2b3344ab0d9fa66f993f9136eba3c4542f22b39 /guides/code/getting_started | |
parent | 047600157a1a7d2ec3e3afa7c90e539f94b37aa5 (diff) | |
parent | 7f04235e523253bcf0a7d58d9f9bb61313a83337 (diff) | |
download | rails-a2fac64fb91c426f64b687270117e956fb77cff6.tar.gz rails-a2fac64fb91c426f64b687270117e956fb77cff6.tar.bz2 rails-a2fac64fb91c426f64b687270117e956fb77cff6.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'guides/code/getting_started')
-rw-r--r-- | guides/code/getting_started/app/views/posts/_form.html.erb | 2 | ||||
-rw-r--r-- | guides/code/getting_started/config/routes.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/guides/code/getting_started/app/views/posts/_form.html.erb b/guides/code/getting_started/app/views/posts/_form.html.erb index 46ec257b91..b35ea2f237 100644 --- a/guides/code/getting_started/app/views/posts/_form.html.erb +++ b/guides/code/getting_started/app/views/posts/_form.html.erb @@ -1,4 +1,4 @@ -<%= form_for :post, :url => { :action => :update, :id => @post.id }, :method => :put do |f| %> +<%= form_for @post do |f| %> <% if @post.errors.any? %> <div id="errorExplanation"> <h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2> diff --git a/guides/code/getting_started/config/routes.rb b/guides/code/getting_started/config/routes.rb index b0973c62d5..02ca24e95a 100644 --- a/guides/code/getting_started/config/routes.rb +++ b/guides/code/getting_started/config/routes.rb @@ -6,9 +6,9 @@ Blog::Application.routes.draw do get "posts" => "posts#index" get "posts/new" post "posts/create" - get "posts/:id" => "posts#show" + get "posts/:id" => "posts#show", :as => :post get "posts/:id/edit" => "posts#edit" - put "posts/:id/update" => "posts#update" + put "posts/:id" => "posts#update" # The priority is based upon order of creation: # first created -> highest priority. |