fixed edge case for pool creation

This commit is contained in:
albert
2012-05-11 15:06:40 -04:00
parent 4b22d0d458
commit 5b557a418a
4 changed files with 5 additions and 4 deletions

View File

@@ -440,7 +440,7 @@ class Post < ActiveRecord::Base
if pool.nil?
pool = Pool.create(:name => $1, :description => "This pool was automatically generated")
end
add_pool!(pool)
add_pool!(pool) if pool
when /^rating:([qse])/i
self.rating = $1.downcase

View File

@@ -28,7 +28,7 @@ class TagImplication < ActiveRecord::Base
all.concat(children)
children = self.class.where(["antecedent_name IN (?)", children]).all.map(&:consequent_name)
end
end.sort
end.sort.uniq
end
end