Skip to content

Instantly share code, notes, and snippets.

@siong1987
Created September 22, 2012 22:16
Show Gist options
  • Save siong1987/3768015 to your computer and use it in GitHub Desktop.
Save siong1987/3768015 to your computer and use it in GitHub Desktop.
sample routes for forkbin
$(document).ready ->
routes =
"":
"NavbarRouter": "index"
"ListsRouter": "index"
"lists/:id":
"NavbarRouter": "index"
"ListsRouter": "show"
"lists/:id/forks":
"NavbarRouter": "index"
"ForksRouter": "index"
":username":
"NavbarRouter": "index"
"UsersRouter": "show"
Backbone.Routes.prefix = Forkbin.Routers
Backbone.Routes.map routes
Backbone.history.start
pushState: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment