mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-13 22:59:19 +10:00
project.issues_labels method
This commit is contained in:
@@ -7,7 +7,7 @@ class LabelsController < ProjectResourceController
|
||||
respond_to :js, :html
|
||||
|
||||
def index
|
||||
@labels = @project.issues.tag_counts_on(:labels).order('count DESC')
|
||||
@labels = @project.issues_labels.order('count DESC')
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
@@ -159,6 +159,10 @@ class Project < ActiveRecord::Base
|
||||
def project_id
|
||||
self.id
|
||||
end
|
||||
|
||||
def issues_labels
|
||||
issues.tag_counts_on(:labels)
|
||||
end
|
||||
end
|
||||
|
||||
# == Schema Information
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Contains common functionality shared between Issues and MergeRequests
|
||||
# Contains common functionality
|
||||
# shared between Issues and MergeRequests
|
||||
module IssueCommonality
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
||||
Reference in New Issue
Block a user