Skip to content

Conversation

@jonodrew
Copy link
Contributor

Draft application code - welcome to look, but not ready yet

This starts us down the path of using Active Job, which is the preferred mechanism for jobs in Rails 7.1.

Signed-off-by: jonathan.kerr <3410350+jonodrew@users.noreply.github.com>
I've taken the copy from Kimberly and put it into HTML, as we do with the rest of our emails

Signed-off-by: jonathan.kerr <3410350+jonodrew@users.noreply.github.com>
This adds an additional method to the MemberMailer class. It's currently called #chaser and it sends...the chaser email.

In the next commit I'll call it from a Job, or maybe a Service that's called from a Job

Signed-off-by: jonathan.kerr <3410350+jonodrew@users.noreply.github.com>
Signed-off-by: jonathan.kerr <3410350+jonodrew@users.noreply.github.com>
.deliver_now
end.to change(MemberEmailDelivery, :count).by(1)

log = MemberEmailDelivery.last
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: When looking up records with #first or #last, and you expect there to be a record, prefer the exception-raising #first! and #last!. Those exceptions are even clearer signals, crashing earlier than "NoMethodError nil does not respond to #member".

You're making nice tests!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants