Suppose that items are sent for further processing (i.e., through screening or delayed_job).
What I want to know is the best practice of sending email notifications from ActiveController or ActiveRecord s?
I think itโs useful to put it in the controller, since you can control whether you need to send an email message (i.e. after the model has saved some other criteria), but the idea that there is ONE place (model), sent by e-mail, if it is processed from the model after saving (create or update, etc.) is also useful.
Did any of you have this dilemma? What did you choose and why? Did you do something completely different?
source share