Using Rails for database access instead of AppConfig