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
b7e6ae03
Commit
b7e6ae03
authored
Aug 19, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Case-insensetive search for comments
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
3659d3b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
CHANGELOG
CHANGELOG
+1
-0
app/models/note.rb
app/models/note.rb
+1
-1
spec/models/note_spec.rb
spec/models/note_spec.rb
+6
-0
No files found.
CHANGELOG
View file @
b7e6ae03
...
@@ -5,6 +5,7 @@ v 8.0.0 (unreleased)
...
@@ -5,6 +5,7 @@ v 8.0.0 (unreleased)
- Better performance for web editor (switched from satellites to rugged)
- Better performance for web editor (switched from satellites to rugged)
- Faster merge
- Faster merge
- Ability to fetch merge requests from refs/merge-requests/:id
- Ability to fetch merge requests from refs/merge-requests/:id
- Search for comments should be case insensetive
v 7.14.0 (unreleased)
v 7.14.0 (unreleased)
- Update default robots.txt rules to disallow crawling of irrelevant pages (Ben Bodenmiller)
- Update default robots.txt rules to disallow crawling of irrelevant pages (Ben Bodenmiller)
...
...
app/models/note.rb
View file @
b7e6ae03
...
@@ -90,7 +90,7 @@ class Note < ActiveRecord::Base
...
@@ -90,7 +90,7 @@ class Note < ActiveRecord::Base
end
end
def
search
(
query
)
def
search
(
query
)
where
(
"
note like :query"
,
query:
"%
#{
query
}
%"
)
where
(
"
LOWER(note) like :query"
,
query:
"%
#{
query
.
downcase
}
%"
)
end
end
end
end
...
...
spec/models/note_spec.rb
View file @
b7e6ae03
...
@@ -198,4 +198,10 @@ describe Note do
...
@@ -198,4 +198,10 @@ describe Note do
let
(
:backref_text
)
{
issue
.
gfm_reference
}
let
(
:backref_text
)
{
issue
.
gfm_reference
}
let
(
:set_mentionable_text
)
{
->
(
txt
)
{
subject
.
note
=
txt
}
}
let
(
:set_mentionable_text
)
{
->
(
txt
)
{
subject
.
note
=
txt
}
}
end
end
describe
:search
do
let!
(
:note
)
{
create
(
:note
,
note:
"WoW"
)
}
it
{
expect
(
Note
.
search
(
'wow'
)).
to
include
(
note
)
}
end
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