rails 4.1 depracation fix (setup in validators)