Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-01 06:06:26 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-01 06:06:26 +0300
commit56d96ad7fab4d4b95f5529d8080b3cc2873794a0 (patch)
tree7fe93fc8ff4d82d815000781ffb9c98d7259211a /app/models/release.rb
parent8078bd185fd9fce86cb5a8d9a6b6209e0c23ae44 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/release.rb')
-rw-r--r--app/models/release.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/release.rb b/app/models/release.rb
index a069e1523b8..1261402712f 100644
--- a/app/models/release.rb
+++ b/app/models/release.rb
@@ -27,13 +27,17 @@ class Release < ApplicationRecord
validates_associated :milestone_releases, message: -> (_, obj) { obj[:value].map(&:errors).map(&:full_messages).join(",") }
scope :sorted, -> { order(released_at: :desc) }
- scope :with_project_and_namespace, -> { includes(project: :namespace) }
+ scope :preloaded, -> { includes(project: :namespace) }
delegate :repository, to: :project
after_commit :create_evidence!, on: :create
after_commit :notify_new_release, on: :create
+ def to_param
+ CGI.escape(tag)
+ end
+
def commit
strong_memoize(:commit) do
repository.commit(actual_sha)