Articles
-
ActiveRecord: Automagically Marshall an API Response
Have you ever had to sync a record from a third party to a local db? I have – in all sorts of systems/languages – and that type of marshalling can be a huge source of grief, esp. if your third party is not a good citizen when it comes to versioning an API and managing breaking changes.
-
Testing: Assert All Model Deltas in One Call
I have a love/hate relationship with ActiveSupport’s assert_difference as a tool to help validate db state. On the one hand, this function is great for acceptance/integration tests where multiple tables may be affected. On the other hand, its verbosity makes it rather untenable for even moderately complex transactions.
-
Just Event It!
ActiveRecord-like Hooks Anywhere?
-
Just Background It!
Background What?
Most Rails developers are aware that backgrounding mailers is a best practice. After all, the ability to do so is baked right into ActionMailer’s API. Aside from that, it’s common to schedule tasks to run outside of any actual web request (ie. database cleanup). For the purpose of the post let’s just focus on things which affect request response time.
So what else then?
-
Welcome To My Blog
I have a confession to make: I’ve never written a blog post before.