zendesk/curly — pull request #108 by dasch (2014-10-29 09:47:02+00:00)
Title: Add support for context blocks

Context blocks change the *context* of the template, making it possible to operate on a different presenter within the block. This is useful in a number of cases, e.g. forms:

```html

{{@signup_form}}
{{name_label}} {{name_input}}

{{email_label}} {{email_input}}

{{submit_button}}
{{/signup_form}}
```

The presenter will have to implement a `signup_form` method that takes a block argument:

```ruby
class Signups::NewPresenter < Curly::Presenter
presents :user

def signup_form(&block)
form_for(@user, &block)
end
end
```

As with collection blocks, a different presenter will be used when rendering the block. In this case, Curly will look for `SignupFormPresenter` in the current presenter scope.