Created
October 30, 2013 16:15
-
-
Save novohispano/7235442 to your computer and use it in GitHub Desktop.
Array of hashes
This file contains 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
slugs = ["menu", "index", "food"] | |
contents = ["menu contents", "index contents", "food contents"] | |
pages = [] | |
pages = slugs.each_with_index do |slug, index| | |
{slug: slug, content: contents[index]} | |
end | |
# [{slug: "menu", content: "menu contents"}, {slug: "index", content: "index contents"}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment