3 ms·
ActiveRecord is certainly a huge part of the problem and it is the first thing to decouple from your models. However there is a wonderful benefit to making sinc
by programminggeek 14y ago
ActiveRecord is certainly a huge part of the problem and it is the first thing to decouple from your models. However there is a wonderful benefit to making since action objects - you can cleanly do dependency injection without side effects on the rest of your service. That makes testing them much cleaner and more obvious. The other really cool thing you could do is wire actions together with different sources. That could make things like data migrations between different data sources trivial or adding caching to smaller slices of your system easy.