4 ms·
Ah, technically correct - the best kind of correct. :-) Anyway, I agree with pretty much everything you say. As I mentioned elsewhere in this thread, we've gon
by urbanautomaton 14y ago
Ah, technically correct - the best kind of correct. :-)
Anyway, I agree with pretty much everything you say. As I mentioned elsewhere in this thread, we've gone down a pub-sub event system for handling our generic post-action tasks. The controller announces a :create_user event, and any interested listeners can respond appropriately. And yes, one of the biggest benefits of this has been the ability to test that event-handling logic in isolation; stubbing and mocking collaborators, and generally having the sort of testing fun you're normally not supposed to have with Rails.