Skip to content

Instantly share code, notes, and snippets.

@jacobo
Created July 28, 2009 17:46
Show Gist options
  • Save jacobo/157557 to your computer and use it in GitHub Desktop.
Save jacobo/157557 to your computer and use it in GitHub Desktop.
#Routes:
ActionController::Routing::Routes.draw do |map|
# The workaround for http://gist.github.com/157553
map.connect ':controller/:action/:id',
:action => /(s(?!how)|u(?!pdate)|d(?!estroy)|e(?!dit)|n(?!ew)|c(?!reate)|i(?!ndex)|([^sudenci0-9]{1}))[^0-9]+/
# restful routes
map.resources :users
# default routes
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment