Skip to content

Not use default route

Richard Huang edited this page Aug 15, 2010 · 3 revisions

Please go to http://rails-bestpractices.com/posts/12-not-use-default-route

Before:


map.resources :posts, :member => { :push => :post }

map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'

After:


map.resources :posts, :member => { :push => :post }

#map.connect ':controller/:action/:id'
#map.connect ':controller/:action/:id.:format'

map.connect 'special/:action/:id', :controller => 'special'