use all/scoped based on activerecord version