I want to email users every time a new treatment that is under the category they are interested in is added.
I have a join table interests_users which is holds a user_id and a interest_id. When a user signs up he/she checks the boxes they are interested in i.e Face, Body etc. Treatments are submitted under the same headings so they can be compared to interests.
What kind of query do I need to write in order that ever time a new treatment is saved users who share the same interest as the category type of treatment get an email?
Aucun commentaire:
Enregistrer un commentaire