Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog
Unreleased
Added
Changed
Deprecated
Removed
Fixed
Security
0.3.0 - 2025-01-27
Added
- Support for Phlex Component context. (
HelloWorld.new.call(context: {some: :data})).- Like layout options, the
:contextplugin option can be used to set a default context. The value will beduped on first use. #phlex_contextmethod to access the context.#set_phlex_contextmethod to set the context.
- Like layout options, the
:delegate_onplugin option to specify the object to delegate methods to. Defaults to::Phlex::SGMLbut its advised to set it to your own subclass of::Phlex::SGML.:delegate_nameplugin option to specify name of the method that delegates to the Roda app. Defaults to"app".
Changed
#phlex_layout,#phlex_layout_opts,#phlex_layout_handlerno longer accept a value to set their value. Use their corresponding#set_*methods instead.
Removed
delegate: :allplugin option removed. You need to specify the methods to delegate explicitly.delegate: <Symbol,String>plugin option removed. Method names need to be specified as an array of symbols or strings, even when delegating only one method.
Fixed
- Mutating the layout options hash no longer affects subsequent requests.
The value passed as
:layout_optsplugin config is nowduped on first use. Note, that mutating nested objects will still affect the original hash.
0.2.0 - 2024-12-13
Added
- Allow
phlex_layout(false)to be used to reset disable layout. - Allow
phlex_layout_handler(:default)to be used to reset to the default layout handler.
Removed
- Don't delete layout options when deleting layout (eg via
phlex_layout(false))
Fixed
phlex_layoutshould accept aPhlex::SGMLclass, not instance.phlex_layout_handlercalled withnilresets it to the default handler.
0.1.0 - 2024-08-28
- Initial release based on https://github.com/benpickles/phlex-sinatra/commit/2e3c9a612cbf6f4b4bf5db880f164b66f008baf8 and https://gist.github.com/RomanTurner/0ce0b8792e4149d152d2af2224cb6407