diff options
Diffstat (limited to 'app/models/project_custom_attribute.rb')
-rw-r--r-- | app/models/project_custom_attribute.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/project_custom_attribute.rb b/app/models/project_custom_attribute.rb new file mode 100644 index 00000000000..3f1a7b86a82 --- /dev/null +++ b/app/models/project_custom_attribute.rb @@ -0,0 +1,6 @@ +class ProjectCustomAttribute < ActiveRecord::Base + belongs_to :project + + validates :project, :key, :value, presence: true + validates :key, uniqueness: { scope: [:project_id] } +end |