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:
parent
8e24a608b0
commit
52ee1928cc
|
@ -53,7 +53,11 @@ class CategoryList
|
||||||
@categories.delete_if { |c| c.featured_topics.blank? }
|
@categories.delete_if { |c| c.featured_topics.blank? }
|
||||||
else
|
else
|
||||||
# Show all categories to people who have the ability to edit and delete categories
|
# 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
|
end
|
||||||
|
|
||||||
# Get forum topic user records if appropriate
|
# Get forum topic user records if appropriate
|
||||||
|
|
Loading…
Reference in New Issue