v0.2.0-alpha.2
Pre-release
Pre-release
·
20 commits
to main
since this release
Added
- Phlex views for hanami-mailer. A mailer renders the Phlex class whose container key matches its own, so
MyApp::Mailers::WelcomerendersMyApp::Views::Mailers::Welcomewith no configuration. Phlex::Hanami::Mailer::ViewandPhlex::Hanami::Mailer::Layout, andPhlex::Hanami::Mailer::Renderablefor an
existingPhlex::HTMLbase class.- A plain text alternative part, converted from the rendered HTML by
Phlex::Hanami::Mailer::Text. Override
text_bodyon the view to write it by hand. - A mail layout convention:
Views::Mailers::Layoutin a slice wraps that slice's mail views. - Usage documentation under docs/usage, covering views, layouts, the view context,
helpers, mailers and how the gem hooks into Hanami. Phlex::Hanami::MailerViewError, raised when a mailer is paired with a Phlex view that is not a mail view,
rather than sending a message whose plain text part is markup.
Changed
urlin a view returns a String. Hanami's routes helper returns aURI, which Phlex rejects as an attribute
value, soa(href: url(:posts))raised.
Fixed
pathin a mail view raisesPhlex::Hanami::RelativePathErrorinstead of writing a relative link an email client
cannot follow.