Rails 3.2 Support

Works in rails 3.2 as well. I was just about to backport exactly this with the same name, nice to see you've beaten us to it.