Rails 3.2 & Ruby 1.9 compatibility

Issue #20