Commit dda6b0ab authored by miks's avatar miks

Unused validator deleted

parent df583bf1
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment