Created
July 25, 2014 20:57
-
-
Save procload/7e81dccf5468710eb8fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def build_categories(articles) | |
categories = [] | |
articles.each do |article| | |
category = article.metadata[:page]['category'] | |
unless categories.include? category | |
categories.push(category) | |
end | |
end | |
return categories | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment