summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-06 15:29:04 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-06 15:29:04 +0100
commitcb8b9c3fe2caba14752978f4283affc07581087c (patch)
treec6f45e4e180d59d6aaefbbc989ec5c2f13caa095
parent962b57df5a3f476407858b12455030d8cda66e4b (diff)
downloadgitlab-ce-cb8b9c3fe2caba14752978f4283affc07581087c.tar.gz
Add association and validation for Release model
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--app/models/release.rb3
1 files changed, 3 insertions, 0 deletions
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