Read about our upcoming Code of Conduct on this issue

Commit 63fe042d authored by randx's avatar randx
Browse files

project.issues_labels method

parent 92ffa759d6e7
...@@ -7,7 +7,7 @@ class LabelsController < ProjectResourceController ...@@ -7,7 +7,7 @@ class LabelsController < ProjectResourceController
respond_to :js, :html respond_to :js, :html
def index def index
@labels = @project.issues.tag_counts_on(:labels).order('count DESC') @labels = @project.issues_labels.order('count DESC')
end end
protected protected
......
...@@ -159,6 +159,10 @@ def wiki_notes ...@@ -159,6 +159,10 @@ def wiki_notes
def project_id def project_id
self.id self.id
end end
def issues_labels
issues.tag_counts_on(:labels)
end
end end
# == Schema Information # == Schema Information
......
# Contains common functionality shared between Issues and MergeRequests # Contains common functionality
# shared between Issues and MergeRequests
module IssueCommonality module IssueCommonality
extend ActiveSupport::Concern extend ActiveSupport::Concern
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment