pathable/quilt — pull request #4 by mponizil (2013-03-22 18:45:45+00:00)
Title: Support locally-defined patches

Branched off of https://github.com/pathable/quilt/pull/3, but happy to re-open if we decide against the name-change. (Is there a better way to make a PR that branches off an existing PR?

Perhaps this idea has been thought about when deciding where to declare patches, but I've found this to be a nice solution when needing domain-specific views in multiple places (but not *everywhere*), ie:

```html
If user submits an invalid response, go to:

If user submits valid response, go to:

```

And then:

```coffeescript
class Actions extends Quilt.View
render: ->
# render @collection specifically for BotGenerator ...

class BotGenerator extends Quilt.View
patches:
actions: (el, options) ->
new Actions({el, collection: @actions})
```