Skip to content

Instantly share code, notes, and snippets.

@brandon-beacher
Created May 13, 2011 13:38
Show Gist options
  • Save brandon-beacher/970557 to your computer and use it in GitHub Desktop.
Save brandon-beacher/970557 to your computer and use it in GitHub Desktop.
# must specify :requirements to properly match routes with punctuation in the :login parameter
# e.g. /recover/[email protected]/096c883031ce4f25bbec60bae2bfaeec1846db23
map.resources :password_keys
map.password_recovery '/recover/:login/:key', :controller => 'password_keys', :action => 'show', :requirements => { :login => /[^\/]+/ }
map.password_reset '/reset/:login/:key', :controller => 'password_keys', :action => 'update', :requirements => { :login => /[^\/]+/ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment