diff options
author | Sean McGivern <sean@gitlab.com> | 2016-07-26 18:31:25 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-07-26 18:31:25 +0300 |
commit | e44bbcb99419357adbab798e7435f61e1c8047d7 (patch) | |
tree | e1a9cc7daef40e9663e91f750c29fe2ef07c3715 /app/controllers/projects/tags_controller.rb | |
parent | 8a95f1f32cd5d93044f4b7b4c9b606267910df79 (diff) |
Show release notes in tag list
A release's tag reference is just the name of the tag, not the entire
tag object.
This also fixes the tags index if a tag's message contains non-UTF8 byte
sequences.
Diffstat (limited to 'app/controllers/projects/tags_controller.rb')
-rw-r--r-- | app/controllers/projects/tags_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/projects/tags_controller.rb b/app/controllers/projects/tags_controller.rb index 6dc495247c8..8592579abbd 100644 --- a/app/controllers/projects/tags_controller.rb +++ b/app/controllers/projects/tags_controller.rb @@ -10,11 +10,12 @@ class Projects::TagsController < Projects::ApplicationController @tags = @repository.tags_sorted_by(@sort) @tags = Kaminari.paginate_array(@tags).page(params[:page]) - @releases = project.releases.where(tag: @tags) + @releases = project.releases.where(tag: @tags.map(&:name)) end def show @tag = @repository.find_tag(params[:id]) + @release = @project.releases.find_or_initialize_by(tag: @tag.name) @commit = @repository.commit(@tag.target) end |