๐จ v0.27.1 โ Email Helpers in Production
A focused patch that fixes how the new Email Sections helpers register with ActionMailer, so midwest_email_* works under production's eager-loading boot instead of crashing on startup. If you shipped v0.27.0's email library to production, this is the release you want.
What's New
Nothing new this release. See v0.27.0 for the Email Sections library, six transactional templates, and Async Assets.
What Changed
Midwest::Email::Helper โ registers correctly under eager loading
The email section helpers are a separate library from the web components โ they can't use Midwest's stylesheet, so their midwest_email_* helpers must reach mailer views only, never controller/page views (where midwest_button and friends would be wrong). v0.27.0 scoped that with ActiveSupport.on_load(:action_mailer), which is correct in development but breaks a production boot:
- Under eager loading (production),
ActionMailer::Baseis already loaded by the time the engine initializer runs, so theon_loadblock fires synchronously, mid-initialization. - Autoloading the reloadable
Midwest::Email::Helperthat early is unsupported and raisesuninitialized constant Midwest::Emailโ the app never finishes booting.
The helper is now attached through a to_prepare hook instead. to_prepare runs once the autoloaders are ready (so the constant resolves) and re-runs on every reload (so a locally edited helper is re-applied without a server restart). The scoping guarantee is unchanged: midwest_email_* stays out of page views, and the web helpers stay out of email templates. See EMAILS.md ยง2.2 / ยง6.1.
The payoff is that a full transactional email โ assembled from the section components and rendered through the real ActionMailer path โ now works in every environment:
What Was Removed
Nothing was removed this release. No component options, slots, or helpers were dropped, and there are no breaking API changes.
Dev Process
- Roadmap โ the v0.27 milestone is marked complete: the async-asset work and the net-new Email Sections library (40+ mail-client-safe sections, six transactional templates, and email visual-regression tooling) all shipped across the v0.27 line.
- Version bumps โ the gem, the
@unabridged/midwestnpm package, and the@unabridged/midwest-language-serverLSP package are all bumped to0.27.1.