Enhancing Templates#render's abilities #531

wants to merge 12 commits into
Commits on Jun 14, 2012
  1. Remove unused greedy entry

    blambeau committed Jun 14, 2012
  2. Promote `render` in public API, with generalized signature.

    blambeau committed Jun 14, 2012
    A private method `_render(view, options, &block)` replaces the previous
    render method. The engine to use can be specified under options[:engine],
    either as a Tilt::Template subclass or a name. When not specified,
    `_render` infers the engine to use from the `view` parameter when possible.
    `render` is promoted in the public API to allow clients to request rendering
    while relying on engine inference. The signature has been generalized
  3. Make sure that options merging occurs in all possible cases.

    blambeau committed Jun 14, 2012
    There is an extra cost for infered engines, because we need two calls
    to Tilt[] to guarantee that the global engine options will correctly be