summaryrefslogtreecommitdiff
path: root/app/models/integration.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/integration.rb')
-rw-r--r--app/models/integration.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/integration.rb b/app/models/integration.rb
index 8e73e822432..3b373c55336 100644
--- a/app/models/integration.rb
+++ b/app/models/integration.rb
@@ -1,3 +1,6 @@
class Integration < ActiveRecord::Base
- belongs_to :project
+ belongs_to :project, required: true, validate: true
+
+ validates :name, presence: true
+ validates :external_token, presence: true, uniqueness: true
end