Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
6b2bd5706a08
Commit
6b2bd570
authored
Jan 18, 2015
by
Dmitriy Zaporozhets
Browse files
Fix tests
parent
69cb277993d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/models/project.rb
View file @
6b2bd570
...
...
@@ -183,7 +183,12 @@
end
def
search
(
query
)
joins
(
:namespace
).
where
(
"projects.archived = ?"
,
false
).
where
(
"LOWER(projects.name) LIKE :query OR LOWER(projects.path) LIKE :query OR LOWER(namespaces.name) LIKE :query OR LOWER(projects.description) LIKE :query"
,
query:
"%
#{
query
.
downcase
}
%"
)
joins
(
:namespace
).
where
(
"projects.archived = ?"
,
false
).
where
(
"LOWER(projects.name) LIKE :query OR
LOWER(projects.path) LIKE :query OR
LOWER(namespaces.name) LIKE :query OR
LOWER(projects.description) LIKE :query"
,
query:
"%
#{
query
.
try
(
:downcase
)
}
%"
)
end
def
search_by_title
(
query
)
...
...
Write
Preview
Supports
Markdown
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