From cb8b9c3fe2caba14752978f4283affc07581087c Mon Sep 17 00:00:00 2001
From: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Date: Fri, 6 Nov 2015 15:29:04 +0100
Subject: [PATCH] Add association and validation for Release model

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
---
 app/models/release.rb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/models/release.rb b/app/models/release.rb
index 1dc9ce6dd4f..05647839e84 100644
--- a/app/models/release.rb
+++ b/app/models/release.rb
@@ -1,2 +1,5 @@
 class Release < ActiveRecord::Base
+  belongs_to :project
+
+  validates :description, :project, presence: true
 end
-- 
GitLab