Ancestors

Toot

Written by mudge on 2024-10-01 at 16:03

If, like me, you’ve wondered why the Action Mailer Basics guide (https://guides.rubyonrails.org/action_mailer_basics.html#calling-the-mailer) uses .with() and params instead of passing arguments to the method on the mailer (i.e. UserMailer.with(user: alice).welcome_email vs UserMailer.welcome_email(user: alice)), this API and its rationale is documented under Action Mailer Parameterized: https://api.rubyonrails.org/v7.1.3.4/classes/ActionMailer/Parameterized.html

(I actually prefer the non-parameterised version but it helps to understand the API is meant for extracting common setup.)

=> More informations about this toot | More toots from mudge@ruby.social

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113233011014355477
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
239.058405 milliseconds
Gemini-to-HTML Time
0.351759 milliseconds

This content has been proxied by September (3851b).