revert rails4 class eval fix for the rails3 version