Oops, I made a spec fail by refactoring after I made the test pass and didn't check the tests

This commit is contained in:
Neil Lalonde 2013-05-07 15:40:18 -04:00
parent 8e24a608b0
commit 52ee1928cc

View file

@ -53,7 +53,11 @@ class CategoryList
@categories.delete_if { |c| c.featured_topics.blank? }
else
# Show all categories to people who have the ability to edit and delete categories
@categories.insert(@categories.size, *Category.where('id not in (?)', @categories.map(&:id).compact).to_a)
if @categories.size > 0
@categories.insert(@categories.size, *Category.where('id not in (?)', @categories.map(&:id).compact).to_a)
else
@categories = Category.all.to_a
end
end
# Get forum topic user records if appropriate