mikeric/rivets — pull request #170 by mikeric (2013-05-23 05:09:55+00:00)
Title: Event Handler Configuration

Adds a configuration option for event handler APIs. Like all other configuration, this can be set globally on rivets.config or locally to a particular `Rivets.View` instance.

The default event handler configuration passes one extra object to the handler — the `view.models` object. Here's an example of what an event handler would look like for the default configuration.

```javascript
completeItem: function(ev, models) {
models.item.set({completed: true})
}
```

To change this API, simply overwrite the `rivets.config.handler` function.

```javascript
rivets.config.handler = function(fn, context, ev, binding) {
fn.call(context, ev, binding.model, binding.view)
}
```