Patch to fix deprecation warnings and carry compatibility forward to Rails 3.2