Ensuring compatibility with activerecord ~> 3.1.0