BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
757e92d5
Unverified
Commit
757e92d5
authored
Jan 18, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent duplicate method names in helpers
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
ffbbccb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
search_helper.rb
app/helpers/search_helper.rb
+5
-5
No files found.
app/helpers/search_helper.rb
View file @
757e92d5
...
...
@@ -49,7 +49,7 @@ module SearchHelper
# Autocomplete results for the current project, if it's defined
def
project_autocomplete
if
@project
&&
@project
.
repository
.
exists?
&&
@project
.
repository
.
root_ref
prefix
=
s
imple
_sanitize
(
@project
.
name_with_namespace
)
prefix
=
s
earch_result
_sanitize
(
@project
.
name_with_namespace
)
ref
=
@ref
||
@project
.
repository
.
root_ref
[
...
...
@@ -74,7 +74,7 @@ module SearchHelper
def
groups_autocomplete
(
term
,
limit
=
5
)
current_user
.
authorized_groups
.
search
(
term
).
limit
(
limit
).
map
do
|
group
|
{
label:
"group:
#{
s
imple
_sanitize
(
group
.
name
)
}
"
,
label:
"group:
#{
s
earch_result
_sanitize
(
group
.
name
)
}
"
,
url:
group_path
(
group
)
}
end
...
...
@@ -84,7 +84,7 @@ module SearchHelper
def
projects_autocomplete
(
term
,
limit
=
5
)
current_user
.
authorized_projects
.
search_by_title
(
term
).
non_archived
.
limit
(
limit
).
map
do
|
p
|
{
label:
"project:
#{
s
imple
_sanitize
(
p
.
name_with_namespace
)
}
"
,
label:
"project:
#{
s
earch_result
_sanitize
(
p
.
name_with_namespace
)
}
"
,
url:
project_path
(
p
)
}
end
...
...
@@ -94,13 +94,13 @@ module SearchHelper
def
public_projects_autocomplete
(
term
,
limit
=
5
)
Project
.
public_or_internal_only
(
current_user
).
search_by_title
(
term
).
non_archived
.
limit
(
limit
).
map
do
|
p
|
{
label:
"project:
#{
s
imple
_sanitize
(
p
.
name_with_namespace
)
}
"
,
label:
"project:
#{
s
earch_result
_sanitize
(
p
.
name_with_namespace
)
}
"
,
url:
project_path
(
p
)
}
end
end
def
s
imple
_sanitize
(
str
)
def
s
earch_result
_sanitize
(
str
)
Sanitize
.
clean
(
str
)
end
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