diff options
author | Phil Hughes <me@iamphill.com> | 2016-11-03 12:16:15 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz1@gmail.com> | 2016-11-21 21:01:45 -0500 |
commit | f9750b4912c6f0e4c7b0b7d213f95223d5d1a593 (patch) | |
tree | 9b75f9b48feecaf4771ddbf719d0ba6d63f15a29 | |
parent | ba2089e01711eb3f97770235b86ae9e59862ee8b (diff) | |
download | gitlab-ce-f9750b4912c6f0e4c7b0b7d213f95223d5d1a593.tar.gz |
Changed how the data is returned - we only care about the branch/tag name
-rw-r--r-- | app/assets/javascripts/project.js | 4 | ||||
-rw-r--r-- | app/controllers/projects_controller.rb | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/app/assets/javascripts/project.js b/app/assets/javascripts/project.js index 7ac070a9c37..e7db0620848 100644 --- a/app/assets/javascripts/project.js +++ b/app/assets/javascripts/project.js @@ -94,8 +94,8 @@ link.className = 'is-active'; } - link.textContent = ref.name; - link.dataset.ref = ref.name; + link.textContent = ref; + link.dataset.ref = ref; li.appendChild(link); } diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 6affadfa0a6..d7bc31b0718 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -267,14 +267,15 @@ class ProjectsController < Projects::ApplicationController end def refs - branches = BranchesFinder.new(@repository, params).execute + branches = BranchesFinder.new(@repository, params).execute.map(&:name) options = { 'Branches' => branches.take(100), } unless @repository.tag_count.zero? - tags = TagsFinder.new(@repository, params).execute + tags = TagsFinder.new(@repository, params).execute.map(&:name) + options['Tags'] = tags.take(100) end |