fix undefined method 'constantize' error