Integrate activerecord