diff options
author | Jason Goodman <jgoodman@gitlab.com> | 2019-04-09 09:52:15 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-04-09 09:52:15 +0300 |
commit | 5b7003282b6b3ce1bfc313b3271bd6827a230c34 (patch) | |
tree | 63ef06c4bb6b87acbcc56d39bdd944a58f06931a /app/models/release.rb | |
parent | 74ac04a6aa7a9398ed908f47080e64ec40e0dee8 (diff) |
Set release name when adding release notes to an existing tag
Also set the release sha and author
Diffstat (limited to 'app/models/release.rb')
-rw-r--r-- | app/models/release.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/release.rb b/app/models/release.rb index 746fc31a038..0f9e94373c7 100644 --- a/app/models/release.rb +++ b/app/models/release.rb @@ -15,6 +15,7 @@ class Release < ApplicationRecord accepts_nested_attributes_for :links, allow_destroy: true validates :description, :project, :tag, presence: true + validates :name, presence: true, on: :create scope :sorted, -> { order(created_at: :desc) } |