documentcloud/backbone — pull request #2216 by carlyle (2013-01-30 05:45:46+00:00)
Title: Allowing for routing functions to be passed to the 'routes' property of Backbone.Router

In order to reduce redundant code when 'controller' type code is separated from an application's router, I've added the ability to pass functions directly into the 'routes' property of Backbone.Router rather than requiring a string that corresponds to a function on the router itself.

Since examples seem to illustrate things better than descriptions, here's the current state of affairs: https://gist.github.com/4670976

And here is how routers can be written with these changes: https://gist.github.com/4670950