Move getAllowedRange() to MyActiveRecord.php