diff --git a/app/controllers/pool_elements_controller.rb b/app/controllers/pool_elements_controller.rb index fd55ee27e..0bbbf66fc 100644 --- a/app/controllers/pool_elements_controller.rb +++ b/app/controllers/pool_elements_controller.rb @@ -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)