This commit is contained in:
albert
2013-01-30 22:02:50 -08:00
parent e6d906dc03
commit 838f8cb77d

View File

@@ -38,7 +38,11 @@ module PostSets
raise SearchError.new("Upgrade your account to search more than two tags at once")
end
@posts ||= ::Post.tag_match(tag_string).paginate(page, :count => ::Post.fast_count(tag_string), :limit => per_page).all
@posts ||= begin
temp = ::Post.tag_match(tag_string).paginate(page, :count => ::Post.fast_count(tag_string), :limit => per_page)
temp.all
temp
end
rescue ::Post::SearchError
@posts = ::Post.where("false")
end