diff options
author | Amparo Luna + Guillermo Iguaran <amparo.m.luna@gmail.com+guilleiguaran@gmail.com> | 2013-01-02 16:40:48 -0500 |
---|---|---|
committer | Amparo Luna + Guillermo Iguaran <amparo.m.luna@gmail.com+guilleiguaran@gmail.com> | 2013-01-03 12:04:25 -0500 |
commit | 03ac174f2d35c92ffefd35a7f69369eb5117d8a7 (patch) | |
tree | 3c9a6c226b04f11a92d9d57cf9017e5ad57e31ea /guides/code/getting_started | |
parent | 1bb020063c1bad6cc6a2ad7a4635bfc31a308f65 (diff) | |
download | rails-03ac174f2d35c92ffefd35a7f69369eb5117d8a7.tar.gz rails-03ac174f2d35c92ffefd35a7f69369eb5117d8a7.tar.bz2 rails-03ac174f2d35c92ffefd35a7f69369eb5117d8a7.zip |
Change guides to use update instead of update_attributes
Diffstat (limited to 'guides/code/getting_started')
-rw-r--r-- | guides/code/getting_started/app/controllers/posts_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/code/getting_started/app/controllers/posts_controller.rb b/guides/code/getting_started/app/controllers/posts_controller.rb index a8ac9aba5a..b74c66ef13 100644 --- a/guides/code/getting_started/app/controllers/posts_controller.rb +++ b/guides/code/getting_started/app/controllers/posts_controller.rb @@ -31,7 +31,7 @@ class PostsController < ApplicationController def update @post = Post.find(params[:id]) - if @post.update_attributes(params[:post]) + if @post.update(params[:post]) redirect_to :action => :show, :id => @post.id else render 'edit' |