debian-mirror-gitlab/app/models/project_custom_attribute.rb
2019-07-07 11:18:12 +05:30

8 lines
213 B
Ruby

# frozen_string_literal: true
class ProjectCustomAttribute < ApplicationRecord
belongs_to :project
validates :project, :key, :value, presence: true
validates :key, uniqueness: { scope: [:project_id] }
end