refactor activerecord constants