Fix expunged posts giving 404 errors on pool show pages

This commit is contained in:
Toks
2013-12-10 21:25:46 -05:00
parent d9bb174f6f
commit f9ede26fbc

View File

@@ -246,8 +246,12 @@ class Pool < ActiveRecord::Base
slice = post_id_array.slice(offset, limit)
if slice && slice.any?
slice.map do |id|
Post.find(id)
end
begin
Post.find(id)
rescue ActiveRecord::RecordNotFound
# swallow
end
end.compact!
else
[]
end