Skip to content

Instantly share code, notes, and snippets.

@hdp
Created May 2, 2009 03:55
Show Gist options
  • Save hdp/105392 to your computer and use it in GitHub Desktop.
Save hdp/105392 to your computer and use it in GitHub Desktop.
controller User {
# /user/\d+/...
chained action user (Int $id) { ... load a user ... }
under user {
# GET /user/\d+
action view at / on GET { ... render a user ... }
# PUT /user/\d+
action update at / on PUT { ... update the user ... }
# DELETE /user/\d+
action delete at / on DELETE { ... delete user ... }
# GET /user/\d+/edit
action edit on GET { ... render an edit form ... }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment