Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider use in projects that don't need notifications but could still use email. #33

Open
digerata opened this issue Feb 3, 2017 · 0 comments

Comments

@digerata
Copy link
Member

digerata commented Feb 3, 2017

The process of actually setting up an email being sent out to someone as a result of an object being saved is so much BETTER than bootstrapping that in Rails!

For Rails:

  1. Add a mailer object and it's method.
  2. Add a mailer views folder and it's html.
  3. Add an after_save method to the model and call the mailer
  4. (Wonder why mail isn't being sent, turn perform_deliveries on in development.rb)

For NotifyOn

  1. Add a notify_on statement to the model
  2. Add a mailer view under views/notifications

It's really only one more step, but it feels so much more lightweight.

That simplicity opens up the idea of: what if I just wanted simple mail alerts? Simple push notifications? I put NotifyOn in ShipIt but we probably won't ever look at notifications in that app. What if actually storing notifications was another config option? I.e., I could use notify just to send out email? (E.g., the notify_on_notifications table doesn't exist, don't persist notifications)

This isn't an urgent thing, but something to consider in looking at allowing this gem to see more in other projects. (For ShipIt, I was just going to periodically empty the notifications table)

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

No branches or pull requests

1 participant