Skip to content

Instantly share code, notes, and snippets.

@eyberg
Created May 3, 2010 17:04
Show Gist options
  • Save eyberg/388315 to your computer and use it in GitHub Desktop.
Save eyberg/388315 to your computer and use it in GitHub Desktop.
1) should be able to respond to urls like /admin/freemoney/I.S.D.A
despite this being a 'bad username' it is a requirement
2) should know the difference between I.S.D.A (a username) and I.S.D.A.text (username w/content-type request)
options:
1) add custom-routes for every url we need eg:
match("/admin/freemoney/(:id)", :id => /(.*)/).to(:controller => "admin", :action => "freemoney")
username = request.path.split('/').last
2) disable content-type request matching (in this case we make more use of the username requests rather than .xml or .json)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment