Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
63fe042d
Commit
63fe042d
authored
Oct 09, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
project.issues_labels method
parent
fa325ce9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
app/controllers/labels_controller.rb
app/controllers/labels_controller.rb
+1
-1
app/models/project.rb
app/models/project.rb
+4
-0
app/roles/issue_commonality.rb
app/roles/issue_commonality.rb
+2
-1
No files found.
app/controllers/labels_controller.rb
View file @
63fe042d
...
@@ -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
...
...
app/models/project.rb
View file @
63fe042d
...
@@ -159,6 +159,10 @@ class Project < ActiveRecord::Base
...
@@ -159,6 +159,10 @@ class Project < ActiveRecord::Base
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
...
...
app/roles/issue_commonality.rb
View file @
63fe042d
# 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment