use the new activerecord api