- Ruby 2.5.1
- Rails 5.2.2.1
- Postgres and Redis required
Forked off a GDPR-compliant Rails 5 skeleton (readme found here)
In production, our users
table has approximately 250,000 users from all over the world, speaking multiple languages. Each user has a birthdate
. This field is not encrypted. Each user also has a locale
, which represents their ISO 639 preferred language.
There is no email provider configured yet, and there's no ActiveJob currently set up.
Not all users want to recieve emails. To determine if a user wants to recieve email, there are some scopes and methods to help:
Consent.find_by(key: 'email').users
, to get a list of users who want to get emailUser.consented_to(Consent.find_by(key: 'email'))
, will also get a list of users who want to get emailuser.consented_to?(Consent.find_by(key: 'email'))
will returntrue
orfalse
if a specific user wants to get email
We would like to send an email to all users on their birthday. Marketing hasn't written the birthday email copy yet, so placeholder text in the template is fine. It will need to be locale-aware for non-English speaking users.
We also need to only send email to users who want to get email.
Use whatever gems, email providers, ActiveJob adapters, etc. you'd like to enable this feature.
- Fork the repository
- Clone locally
- Setup Postgres and Redis (if you haven't already)
- Implement the feature
- Open a pull request back to this repository