fix rails 4.2 deprecation warning in uniqueness validator