Created
June 24, 2011 02:45
-
-
Save jcasimir/1044122 to your computer and use it in GitHub Desktop.
Solution for "RouterTester" Example
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SHouldn't the root route be as follows?
root :to => "managers#index"