Get the latest tech news
Phlex for Rails Emails: Action Mailer Without ERB
Rendering Action Mailer emails with Phlex components and layouts: Clean, Composable, and Completely Ruby - Blog post by Camillo Visini
In the past months, I found switching from Ruby to ERB views and partials to be interrupting my flow and therefore increasingly annoying. After already completely ditching ERB for Phlex in Rails views for multiple applications, I wanted to see if I could do the same for Action Mailer. This test ensures that while we refactor, we produce exactly the same email content (HTML and text) while we move from ERB to Phlex.
Or read this on Hacker News