提交 f9750b49 编写于 作者: P Phil Hughes 提交者: Jacob Schatz

Changed how the data is returned - we only care about the branch/tag name

上级 ba2089e0
......@@ -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);
}
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册