This commit is contained in:
albert
2012-01-13 19:19:55 -05:00
parent d05622b5cb
commit 15ef261ffb

View File

@@ -3,12 +3,7 @@ class PoolElementsController < ApplicationController
before_filter :member_only
def create
@pool = Pool.find_by_name(params[:pool_name]) || Pool.find_by_id(params[:pool_id])
if @pool.nil?
return
end
@pool = Pool.find_by_name(params[:pool_name]) || Pool.find_by_id(params[:pool_id]) || Pool.create(:name => params[:pool_name], :description => "This pool was automatically generated")
@post = Post.find(params[:post_id])
@pool.add!(@post)
append_pool_to_session(@pool)