Make ready for active record v2

modify methods to meet new standard