diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-10-03 09:37:48 +0200 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-10-03 09:37:48 +0200 |
commit | c488bcd13e6e0405d990608c8695ffabe17ffcae (patch) | |
tree | 7c1e07081e8ccf88fef05a368a8c5bc4d87ceb55 /app/models/user_custom_attribute.rb | |
parent | 59a6f15cd22621826116446d5f28753c973ba2d1 (diff) | |
parent | bdc50ed779cb0c7d266c0f80f3e66a25da8b1964 (diff) | |
download | gitlab-ce-c488bcd13e6e0405d990608c8695ffabe17ffcae.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into 18608-lock-issues-v2
# Conflicts:
# db/schema.rb
Diffstat (limited to 'app/models/user_custom_attribute.rb')
-rw-r--r-- | app/models/user_custom_attribute.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/user_custom_attribute.rb b/app/models/user_custom_attribute.rb new file mode 100644 index 00000000000..eff25b31f9b --- /dev/null +++ b/app/models/user_custom_attribute.rb @@ -0,0 +1,6 @@ +class UserCustomAttribute < ActiveRecord::Base + belongs_to :user + + validates :user_id, :key, :value, presence: true + validates :key, uniqueness: { scope: [:user_id] } +end |