Unused validator deleted
This commit is contained in:
parent
df583bf12d
commit
dda6b0ab63
|
@ -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
|
Loading…
Reference in a new issue