diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-04-28 00:56:17 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-04-28 00:56:17 +0530 |
commit | 43af34c0f6c81d4d93be1bc1e743c202e8244485 (patch) | |
tree | 1792c580a3138baf710b632110861f5d68f4de63 /guides/code/getting_started/app/controllers | |
parent | 50b1399b3128fcba73bf3478e22d187090921872 (diff) | |
parent | fc3d15dcb0c4265d1aaeedfc51d8a8c8e382347a (diff) | |
download | rails-43af34c0f6c81d4d93be1bc1e743c202e8244485.tar.gz rails-43af34c0f6c81d4d93be1bc1e743c202e8244485.tar.bz2 rails-43af34c0f6c81d4d93be1bc1e743c202e8244485.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'guides/code/getting_started/app/controllers')
-rw-r--r-- | guides/code/getting_started/app/controllers/posts_controller.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/guides/code/getting_started/app/controllers/posts_controller.rb b/guides/code/getting_started/app/controllers/posts_controller.rb index fc71e9b4e8..85d2c1de47 100644 --- a/guides/code/getting_started/app/controllers/posts_controller.rb +++ b/guides/code/getting_started/app/controllers/posts_controller.rb @@ -35,4 +35,11 @@ class PostsController < ApplicationController render 'edit' end end + + def destroy + @post = Post.find(params[:id]) + @post.destroy + + redirect_to :action => :index + end end |