Converted to Ruby 1.9, added Rails 4 support.