Skip to content

Instantly share code, notes, and snippets.

@sprite2005
Created June 23, 2009 05:50
Show Gist options
  • Save sprite2005/134380 to your computer and use it in GitHub Desktop.
Save sprite2005/134380 to your computer and use it in GitHub Desktop.
desc "Populate the listing categories"
task :populate_listing_categories => :environment do
ListingCategory.delete_all
# Main Category
@root = ListingCategory.new(:title => "Adults Only")
@root.save! # Save parent
# Women/Men/TG
@root_child1 = @root.children.create(:title => "Find Women")
@root_child2 = @root.children.create(:title => "Find Men")
@root_child3 = @root.children.create(:title => "Find Transgender")
# Women Sub Categories
@root_child1_child1 = @root_child1.children.create(:title => "Women Home Alone")
@root_child1_child1_child1 = @root_child1_child1.children.create(:title => "Sex")
@root_child1_child1_child2 = @root_child1_child1.children.create(:title => "Oral Sex")
@root_child1_child1_child3 = @root_child1_child1.children.create(:title => "Mature")
@root_child1_child1_child4 = @root_child1_child1.children.create(:title => "Anal Sex")
@root_child1_child1_child5 = @root_child1_child1.children.create(:title => "Sex Toys")
@root_child1_child1_child6 = @root_child1_child1.children.create(:title => "BBW")
@root_child1_child1_child7 = @root_child1_child1.children.create(:title => "Housewives")
@root_child1_child1_child8 = @root_child1_child1.children.create(:title => "Latina")
@root_child1_child1_child9 = @root_child1_child1.children.create(:title => "Ebony")
@root_child1_child1_child10 = @root_child1_child1.children.create(:title => "Asian")
@root_child1_child2 = @root_child1.children.create(:title => "Phone With Cam")
@root_child1_child3 = @root_child1.children.create(:title => "Fetish")
@root_child1_child4 = @root_child1.children.create(:title => "BDSM")
@root_child1_child5 = @root_child1.children.create(:title => "Anything Goes")
@root_child1_child6 = @root_child1.children.create(:title => "Fantasy")
@root_child1_child7 = @root_child1.children.create(:title => "Other")
@root_child1_child8 = @root_child1.children.create(:title => "Couples")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment