stubbed in pool controller test

This commit is contained in:
albert
2011-01-20 18:30:36 -05:00
parent d84818366b
commit cd451109e8
12 changed files with 131 additions and 6 deletions

View File

@@ -0,0 +1,18 @@
class PoolsPostsController < ApplicationController
respond_to :html, :xml, :json
before_filter :member_only
def create
@pool = Pool.find(params[:pool_id])
@post = Post.find(params[:post_id])
@pool.add_post!(@post)
respond_with(@pool)
end
def destroy
@pool = Pool.find(params[:pool_id])
@post = Post.find(params[:post_id])
@pool.remove_post!(@post)
respond_with(@pool)
end
end