Skip to content

Instantly share code, notes, and snippets.

@sgharms
Created January 13, 2012 16:48
Show Gist options
  • Save sgharms/1607452 to your computer and use it in GitHub Desktop.
Save sgharms/1607452 to your computer and use it in GitHub Desktop.
BB Router for Timesheet
class Timesheet.Routers.TasksRouter extends Backbone.Router
routes:
"": "index",
"new?completed_on=:completedOn": "new"
initialize: ->
@newTask = new Timesheet.Models.Task Timesheet.localGet('task')
...
@dateScrollView = new Timesheet.Views.DateScrollView
model: @newTask
collection: Timesheet.Tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment