Add compatibility for rails >= 3.2

Specs passing locally for activesupport 3.2 through 4.1.1.

---

RFC @liveh2o