diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-02-03 00:16:24 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-02-03 00:18:25 +0100 |
commit | 20714ee90232b5577fc99f2a773ddccf71482c08 (patch) | |
tree | 87d84e442bdf9bee58d1ef6f67d658035ac1e777 /app/models | |
parent | 79efb9d0b2d08764ac1a7b0b8e3004c6da9236c1 (diff) | |
download | gitlab-ce-20714ee90232b5577fc99f2a773ddccf71482c08.tar.gz |
Change UserCallout feautre_name to enum
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/user_callout.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/models/user_callout.rb b/app/models/user_callout.rb index 8b31aa6fa5c..a7cfe5df7c0 100644 --- a/app/models/user_callout.rb +++ b/app/models/user_callout.rb @@ -1,6 +1,13 @@ class UserCallout < ActiveRecord::Base belongs_to :user + enum feature_name: { + gke_cluster_integration: 0 + } + validates :user, presence: true - validates :feature_name, presence: true, uniqueness: { scope: :user_id } + validates :feature_name, + presence: true, + uniqueness: { scope: :user_id }, + inclusion: { in: UserCallout.feature_names.keys } end |