fixed that activerecord failed to validate int value