stubbed in pool controller test
This commit is contained in:
18
app/controllers/pools_posts_controller.rb
Normal file
18
app/controllers/pools_posts_controller.rb
Normal 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
|
||||
Reference in New Issue
Block a user