Skip to content

Instantly share code, notes, and snippets.

@the-teacher
Created November 18, 2013 15:00
Show Gist options
  • Save the-teacher/7529167 to your computer and use it in GitHub Desktop.
Save the-teacher/7529167 to your computer and use it in GitHub Desktop.
categories.each do |category|
root_hub = create_new_hub(category)
children = sub_categories_for(category)
children.each do |subcategory|
sub_hub = create_new_hub(subcategory)
sub_hub.move_to_child(root_hub)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment