Assume mailings are sent of to be processed later (i.e. through starling or delayed_job).
What I want to know is its a better practice to send email notifications from ActiveController
s or ActiveRecord
s?
I guess its useful to put it in the controller since you might want to control whether an email SHOULD be sent or not (i.e. after a model saves some other criteria might be important) but the idea that there is ONE place (the model) that the email gets sent from if its processed from the model after a save (create or update etc) is also useful.
Have anyone of you had this dilemma? Which did you choose and why? Did you do something completely different?