Unused validator deleted

This commit is contained in:
miks 2011-12-31 19:40:38 +02:00
parent df583bf12d
commit dda6b0ab63

View file

@ -1,7 +0,0 @@
class UniquePublicKeyValidator < ActiveModel::Validator
def validate(record)
if (DeployKey.where('key = ? AND id !=?', record.key , record.id).count > 0 || Key.where('key = ? AND id !=?', record.key , record.id).count > 0)
record.errors.add :key, 'already exist.'
end
end
end