Recursively convert a Ruby hash to OpenStruct

I love OpenStruct. Like love love. The only reason I wouldn't marry it is that it won't recursively convert a nested hash to OpenStruct. So I wrote a hash extension to do just that. Wip out your credit cards, our wedding registry is forth coming. (more…)

Read More


Extend Ruby hash to return all keys as symbols

It is sometimes useful to force all hash keys to be symbols, especially in a situation where you can't use HashWithIndifferentAccess. (more…)

Read More


YayQuery: The best thing in the whole world?

Posted on May 4, 2012

Answer: Yes! yayQuery by Jonathan Neal

Read More


Ruby gotcha: string comparison is case sensitive

Posted on March 14, 2012

Here is a Ruby gotcha: String comparison is case sensitive. (more…)

Read More


Rails Single Table Inheritance Helper Module

Single table inheritance is a somewhat controversial topic in Rails land. For me, I like the Rails magic that it brings and, you know, the inheritance. However, it can clearly be abused. Here is my one rule for using Single table inheritance: (more…)

Read More