Skip to content

Instantly share code, notes, and snippets.

@jcasimir
Created June 24, 2011 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcasimir/1044122 to your computer and use it in GitHub Desktop.
Save jcasimir/1044122 to your computer and use it in GitHub Desktop.
Solution for "RouterTester" Example
RouterTester::Application.routes.draw do
resources :employees do
resources :evaluations do
resources :scores
end
member do
put :promote
end
end
resources :managers do
collection do
get :generate_statistics
end
end
match '/bosses' => redirect("/managers")
match '/bosses/:id' => redirect("/manaagers/#{id}")
match '/directory' => "employees#index", :as => 'directory'
match '/search(/:group(/:name))' => "searches#new", :as => 'search'
root :to => "managers#index"
end
@solsberg
Copy link

solsberg commented Jan 5, 2012

SHouldn't the root route be as follows?
root :to => "managers#index"

@jcasimir
Copy link
Author

jcasimir commented Jan 6, 2012

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment