Depend on activerecord instead of rails