Today's dish is a refactoring approached from two different perspectives. Enjoy!
Episode #184: Sequel, Postgres, JSON
Recently we looked at the Sequel library for interacting with SQL databases. Today, we'll use Sequel again to play with the native JSON support in PostgreSQL 9.3.
Episode #183: Extracting Ghost Load
We've used the "ghost object" pattern to lazily load attributes of a model object. And we've made a macro to easily declare "ghost-loadable" attribute accessors. Today we complete the generalization …
Episode #181: Schwartzian Transform
Today's episode demonstrates a technique for speeding up the process of sorting some collections.
Episode #180: Ghost Load
In today's episode we learn at how to implement lazy loading using the "ghost object" pattern.
Episode #179: Sequel
ActiveRecord has become practically synonymous with SQL database access in Ruby, but it's not the only way to talk to SQL stores. Today we'll explore Sequel, a wonderfully rich tool …
Episode #178: Identity Map
In the last episode we looked at the problem of "aliasing", here there are multiple objects representing a single row in a database. Today, we'll look at one possible solution …
Episode #177: Aliasing
Today we look at a perncious problem that sometimes plagues code which uses an Object-Relational Mapper (ORM). Documentation of the ActiveRecord inverse_of option mentioned in the episode can be found …