diff options
| author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-01-03 09:09:59 -0800 |
|---|---|---|
| committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-01-03 09:09:59 -0800 |
| commit | cb2bd4aa619d9329c42aaf6d9f8eacc616ce53f4 (patch) | |
| tree | 409db16994e4a96c8ac08a04a0a37dd34df7c2cb /guides/code/getting_started/app/controllers | |
| parent | b4a23edc106f0c74aaa71fc605b76429064e3436 (diff) | |
| parent | d826f14443a8030068324b1fcab8dc0f1fc87c9d (diff) | |
| download | rails-cb2bd4aa619d9329c42aaf6d9f8eacc616ce53f4.tar.gz rails-cb2bd4aa619d9329c42aaf6d9f8eacc616ce53f4.tar.bz2 rails-cb2bd4aa619d9329c42aaf6d9f8eacc616ce53f4.zip | |
Merge pull request #8705 from amparo-luna/change_update_attributes_to_update
Rename update_attributes method to update
Diffstat (limited to 'guides/code/getting_started/app/controllers')
| -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' |
