fixes #269
This commit is contained in:
@@ -3,12 +3,7 @@ class PoolElementsController < ApplicationController
|
|||||||
before_filter :member_only
|
before_filter :member_only
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@pool = Pool.find_by_name(params[:pool_name]) || Pool.find_by_id(params[:pool_id])
|
@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")
|
||||||
|
|
||||||
if @pool.nil?
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
@post = Post.find(params[:post_id])
|
@post = Post.find(params[:post_id])
|
||||||
@pool.add!(@post)
|
@pool.add!(@post)
|
||||||
append_pool_to_session(@pool)
|
append_pool_to_session(@pool)
|
||||||
|
|||||||
Reference in New Issue
Block a user