fixes #269
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user