2011 Year in Review

For prospective employers, potential clients, and my own future sanity, I thought it might be a smart idea to start recounting my achievements from the year. It’s been a very long and extremely busy year, professionally. The overwhelming majority of my professional capacity in 2011 has been focused on PlayON! Sports, my current employer, but I do have some other personal/professional achievements to recount as well, so let me just dive right in.

Continue reading

Complex query filters with ActiveAdmin

I had expected this topic to be long, complicated and extremely difficult, but I was pleasantly surprised to learn how dead simple it was to accomplish using tools already built into ActiveAdmin, and more specifically, MetaSearch.

Here’s the scenario: My application contains a model which has attributes for both the start and end of a range. Specifically, a Production has both start_date and end_date columns which together define the span of time over which that production occurs. I wanted a way to search for productions in a time period, but I wanted to see any productions where the range of dates for the production fell within the query window I specified.

Let me give a better example. I have a production that begins on Dec. 1st and runs through Dec. 5th. That range, 12/1 – 12/5 is the production window. I want to query for any productions occurring between Dec. 2nd and Dec. 4th. So the query window is 12/2 – 12/4. The query window is more narrow than the production window, and so simple filtering on start_date or end_date won’t work.

Continue reading


While developing my blog in Rails, I resolved to include a mechanism for assigning arbitrary, SEO-friendly URLs to my content, similar to what the Path module in Drupal does. Such a feature is common in popular blogging engines like WordPress and Blogger, so it didn’t seem such a far-fetched feature.

Implementing the functionality turned out to be much more difficult that I had first imagined. The problems I encountered, which led me deep into the bowels of Rails to understand and resolve, have left me with a vastly improved understanding of how a Rails application works. Below, I detail some of those problems and how I overcame them. Continue reading

Rails Routes: match and mount

While working on the SlugEngine built into this blog site, I came across a note-worthy errata in the book Rails 3 in Action.

Section 18.3.1 states that the following two lines in config/routes.rb are functionally equivalent:

# method one
mount Foo::Bar, :at => 'foo/bar'

# method two
match 'foo/bar', :to => Foo::Bar

These two routes are similar. In fact, mount in turn calls match to complete the route setup. However, the difference (as of Rails 3.1.1) lies in the options that mount passes along to match. Continue reading

Upgrading to Rails 3.1 on Heroku — Part III: Rails

Upgrading to Rails 3.1 on Heroku — Part III: Rails

Up to this point in this series I have been focused on some of the prerequisites to upgrading Rails to 3.1. In this post, all of those requirements have been satisfied, and I can finally get to the meat of the task: upgrading the Rails gem! Continue reading

Upgrading to Rails 3.1 on Heroku — Part II: Stack Migration

In the last post, I started upgrading to Rails 3.1 on Heroku by first satisfying some of the prerequisites, such as ensuring that my application would run on Ruby 1.9.2.

In this post, I’m going to continue that process by actually migrating my Heroku application from a Bamboo stack to the new Cedar stack.

Since this is a real-world, live application, it’s important that everything be tested in a staging environment before I start mucking about with the live application. Since Heroku apps are (almost) free and take (almost) no time to setup, I’ll be relying heavily on that feature during this process.

Continue reading

Upgrading to Rails 3.1 on Heroku — Part I: Ruby 1.9.2

I am developing an application on Heroku’s Bamboo stack (bamboo-ree-1.8.7) that’s currently on Rails 3.0. I’d like to upgrade to Rails 3.1 to get the new asset pipeline working for me, but that, unfortunately, isn’t quite as easy as just updating my Gemfile. In this first part of the series I’ve documented the prerequisite steps by upgrading to Ruby 1.9.2 on my local machine. Continue reading