Skip to content

Instantly share code, notes, and snippets.

View dust3d's full-sized avatar

Dustin Anderson dust3d

View GitHub Profile
@dust3d
dust3d / routes.rb
Created August 24, 2011 02:42 — forked from mindscratch/routes.rb
Rails (3.0.x): easily namespace routes for entire app
MyApp::Application.routes.draw do
my_draw = Proc.new do
#get "widgets" => "widgets#index"
# add routes here
end
["Daily Deals", "Clothing & Accessories", "Home & Garden", "Baby, Kids & Toy", "Department Stores", "Pets", "Electronics", "Flowers & Gifts", "Sports & Recreation", "Food & Drink", "Automotive", "Health & Medical", "Beauty & Spas", "Travel", "Arts & Entertainment", "Other"].
CATEGORIES = {
'Art, Craft & Supplies' => Category.find_by_name('Other'),
'Arts & Entertainment' => Category.find_by_name('Arts & Entertainment'),
'Automotive' => Category.find_by_name('Automotive'),
'Beauty & Spas' => Category.find_by_name('Beauty & Spas'),
'Classes & Workshops' => Category.find_by_name('Other'),
'Clothing & Accessories' => Category.find_by_name('Clothing & Accessories'),
'Dance' => Category.find_by_name('Arts & Entertainment'),