Files
danbooru/app/controllers/pools_posts_controller.rb
2011-01-20 18:30:36 -05:00

19 lines
426 B
Ruby

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