3 ms·
Was going to say the same thing. Models should not know or care about background queues or mailings, and callback use has always caused problems for me later on
by jameskilton 14y ago
Was going to say the same thing. Models should not know or care about background queues or mailings, and callback use has always caused problems for me later on.
Nothing against the OP, it does explain a common edge case that many people will run into and for that it's a good article, but I wish more people would see the violations of SRP going on here and try to lead people away from this trap.
I'd recommend watching http://www.youtube.com/watch?v=CGN4RFkhH2M http://www.youtube.com/watch?v=CGN4RFkhH2M (Hexagonal Rails GoRuCo talk) for one way to re-architect to get away from these inter dependencies.