* Refactored routes some

* Fixed some major bugs with pools and pool versioning
This commit is contained in:
albert
2011-01-21 18:07:34 -05:00
parent cd451109e8
commit 6824e98af3
13 changed files with 101 additions and 51 deletions

View File

@@ -4,15 +4,15 @@ class PoolsPostsController < ApplicationController
def create
@pool = Pool.find(params[:pool_id])
@post = Post.find(params[:post_id])
@post = Post.find(params[:id])
@pool.add_post!(@post)
respond_with(@pool)
respond_with(@pool, :location => pool_path(@pool))
end
def destroy
@pool = Pool.find(params[:pool_id])
@post = Post.find(params[:post_id])
@post = Post.find(params[:id])
@pool.remove_post!(@post)
respond_with(@pool)
respond_with(@pool, :location => pool_path(@pool))
end
end