redding/deas — pull request #18 by jcredding (2013-04-26 15:26:26+00:00)
Title: Add a render helper for rending non-partial templates

This adds a helper for rendering non-partial templates in a template. This is convenient for rendering templates from gems or locations outside the configured views path. This allows access to the `render` method which works like the `render` method available to the handler. It allows specifying a non-partial template like so:

```ruby
render :my_template, :views => '/path/to/my_gem/app/views', :locals => { :my_object => object }
```

This `render` method looks similar to the one in the handler, but doesn't default your locals and doesn't use the configured layout.

@kellyredding - This isn't a complete PR, but I found I needed something like this to render a template from a gem. Otherwise, Sinatra will always try to render relative to your views path. With this, you can pass your own views path (or any other option). This is essentially the all powerful way to render, but it's not friendly (or as easy to use) as the `partial` helper.