-
Add support for Phlex 2, drop support for Phlex 1 - this also means the minimum required Ruby version is now 3.2.
-
Reimplement this library to use the official Sinatra extension API. For a modular-style app the extension must now be explicitly registered:
class MyApp < Sinatra::Base helpers Phlex::Sinatra end
- Add support for wrapping a Phlex view in a layout. Pass
layout: trueto use Sinatra's default layout or specify the view by passing a symbol. Defaults to ERB and other Sinatra templating languages can be specified via thelayout_engine:keyword.
- Add support for streaming a view. Pass
stream: trueto the#phlexhelper so Phlex will use Sinatra's streaming capability.
- Allow passing a
content_type:kwarg to the#phlexhelper so it behaves like Sinatra's other template helpers (defaults to:html– or:svgfor aPhlex::SVGinstance). - Raise an informative error message if the
#phlexhelper receives something other than a Phlex instance.
- Initial release