ActiveRecord 3.x and 4.x support