Crazy, Heretical, and Awesome: The Way I Write Rails Apps | James on Software:
To decouple the logging from the creation of the database record, we’re going to use something called a service object. A service object is typically used to coordinate two or more objects; usually, the service object doesn’t have any logic of its own (simplified definition). We’re also going to use Dependency Injection so that we can mock everything out and make our tests awesomely fast (seconds not minutes).
[Again, a missing refactoring from the last major project…]