Skip to content
Browse files

Multiple categories allowed

  • Loading branch information...
1 parent 01d3a93 commit 92d086684507cfdfa3f00368e2b88f267608ea75 @weavejester committed Feb 21, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 generate.rb
View
4 generate.rb
@@ -8,7 +8,9 @@
@categories = Hash.new { |h, k| h[k] = [] }
projects.each do |project|
- @categories[project['category']] << project
+ project['category'].split(',').each do |category|
+ @categories[category.strip] << project
+ end
end
template = ERB.new(File.read("src/index.html.erb"))

0 comments on commit 92d0866

Please sign in to comment.
Something went wrong with that request. Please try again.