allow use in activerecord > 3.2