Jakub Arnold of Sensible.io has an interesting post where he takes you through the consequences of dumping coupled code that depends on the Mailchimp gem inside of an ActiveRecord model’s callback cycle. As Jakub explains, this dependency may cause exceptions when saving the model and even if you handle the exception, your call to Mailchimp may fail. He goes through several steps, eventually extracting the Mailchimp logic into a separate class, and to handle possible network issues, he uses a queue which will retry in case of failure. It’s a nice, short example of something
that can definitely bite you if you casually take dumps it inside of a Rails model.
Semaphore is now free for open source projects, URL extraction with PostRank-URI, STI with JSON fields, a different approach to email validation, transit-rails, and the Pixel Perfect Precision Handbook all in this episode of the Ruby5!