Thinking about implementing of (a little bit) smarter notification system in my project. What I'd like to do is emailing user about few new let's say private messages once within certain range of time rather than each time he gets new message. Of course there will not be without delayed_job, but here I've got a couple of etic questions about ActionMailer:
So you'll be sending an email "Digest" of the various "Notifications" that occur in the system.
I suggest you move the logic that right now sends an email using ActionMailer to a Notification class. This will persist the notification with a flag set to false for notified (or similar).
Then, have a job run daily (or similar) that sends a digest email to people who have notifications they need to receive.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With