From 03ac174f2d35c92ffefd35a7f69369eb5117d8a7 Mon Sep 17 00:00:00 2001 From: Amparo Luna + Guillermo Iguaran Date: Wed, 2 Jan 2013 16:40:48 -0500 Subject: Change guides to use update instead of update_attributes --- guides/code/getting_started/app/controllers/posts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/code/getting_started/app/controllers') 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' -- cgit v1.2.3