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
Jérome Perrin
gitlab-ce
Commits
b89d8497
Commit
b89d8497
authored
Nov 13, 2013
by
Izaak Alpert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated convience method to private
parent
91c7b266
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
app/controllers/search_controller.rb
app/controllers/search_controller.rb
+2
-0
spec/controllers/search_controller_spec.rb
spec/controllers/search_controller_spec.rb
+1
-1
No files found.
app/controllers/search_controller.rb
View file @
b89d8497
...
...
@@ -15,6 +15,8 @@ class SearchController < ApplicationController
@total_results
=
@projects
.
count
+
@merge_requests
.
count
+
@issues
.
count
+
@wiki_pages
.
count
+
@blobs
.
total_count
end
private
def
find_project_ids
(
group_id
,
project_id
)
project_ids
=
current_user
.
authorized_projects
.
map
(
&
:id
)
...
...
spec/controllers/search_controller_spec.rb
View file @
b89d8497
...
...
@@ -10,7 +10,7 @@ describe SearchController do
describe
'#find_project_ids'
do
it
'should include public projects ids when searching within a single project'
do
project_ids
=
controller
.
find_project_ids
(
nil
,
project
.
id
)
project_ids
=
controller
.
send
(
:find_project_ids
,
nil
,
project
.
id
)
project_ids
.
size
.
should
==
1
project_ids
[
0
].
should
==
project
.
id
end
...
...
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