diff options
| author | karen Carias <karen@gitlab.com> | 2015-07-16 11:25:12 -0700 |
|---|---|---|
| committer | karen Carias <karen@gitlab.com> | 2015-07-16 11:25:12 -0700 |
| commit | 70a08acedf96b685fea93f759637439884a66aa7 (patch) | |
| tree | 49041f01ed1f0ee4098ac9105d84f5cdbf8baedb /app/models/key.rb | |
| parent | 53d40b8ab1275fa39e1ae4b82a228ccf731045f9 (diff) | |
| parent | 9b6f1c59484a0c0e4cee9a27cfa4dc9a89683848 (diff) | |
| download | gitlab-ce-70a08acedf96b685fea93f759637439884a66aa7.tar.gz | |
fixed conflict
Diffstat (limited to 'app/models/key.rb')
| -rw-r--r-- | app/models/key.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/key.rb b/app/models/key.rb index bbc28678177..2dcae059c0e 100644 --- a/app/models/key.rb +++ b/app/models/key.rb @@ -24,6 +24,7 @@ class Key < ActiveRecord::Base validates :title, presence: true, length: { within: 0..255 } validates :key, presence: true, length: { within: 0..5000 }, format: { with: /\A(ssh|ecdsa)-.*\Z/ }, uniqueness: true + validates :key, format: { without: /\n|\r/, message: 'should be a single line' } validates :fingerprint, uniqueness: true, presence: { message: 'cannot be generated' } delegate :name, :email, to: :user, prefix: true |
