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
Léo-Paul Géneau
gitlab-ce
Commits
4bd17d4f
Commit
4bd17d4f
authored
Jun 30, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make issuables_count_for_state public
This doesn't need to be public in CE, but EE uses it as such.
parent
cb30edfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
app/helpers/issuables_helper.rb
app/helpers/issuables_helper.rb
+12
-12
No files found.
app/helpers/issuables_helper.rb
View file @
4bd17d4f
...
@@ -233,6 +233,18 @@ module IssuablesHelper
...
@@ -233,6 +233,18 @@ module IssuablesHelper
}
}
end
end
def
issuables_count_for_state
(
issuable_type
,
state
,
finder:
nil
)
finder
||=
public_send
(
"
#{
issuable_type
}
_finder"
)
cache_key
=
finder
.
state_counter_cache_key
(
state
)
@counts
||=
{}
@counts
[
cache_key
]
||=
Rails
.
cache
.
fetch
(
cache_key
,
expires_in:
2
.
minutes
)
do
finder
.
count_by_state
end
@counts
[
cache_key
][
state
]
end
private
private
def
sidebar_gutter_collapsed?
def
sidebar_gutter_collapsed?
...
@@ -251,18 +263,6 @@ module IssuablesHelper
...
@@ -251,18 +263,6 @@ module IssuablesHelper
end
end
end
end
def
issuables_count_for_state
(
issuable_type
,
state
,
finder:
nil
)
finder
||=
public_send
(
"
#{
issuable_type
}
_finder"
)
cache_key
=
finder
.
state_counter_cache_key
(
state
)
@counts
||=
{}
@counts
[
cache_key
]
||=
Rails
.
cache
.
fetch
(
cache_key
,
expires_in:
2
.
minutes
)
do
finder
.
count_by_state
end
@counts
[
cache_key
][
state
]
end
def
issuable_templates
(
issuable
)
def
issuable_templates
(
issuable
)
@issuable_templates
||=
@issuable_templates
||=
case
issuable
case
issuable
...
...
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