gitlab-org--gitlab-foss/app/models/release.rb
Alessio Caiazza b782ba1113
Add name, author and sha to releases
This commit adds a name to each release, defaulting it to tag name,
keeps track of the SHA when a new release is created and tracks the
current user as release author.
2018-12-13 12:15:21 +01:00

12 lines
258 B
Ruby

# frozen_string_literal: true
class Release < ActiveRecord::Base
include CacheMarkdownField
cache_markdown_field :description
belongs_to :project
belongs_to :author, class_name: 'User'
validates :description, :project, :tag, presence: true
end