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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
20ff87a2
Commit
20ff87a2
authored
Sep 05, 2017
by
Maxim Rydkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename yet_another_users_finder into autocomplete_users_finder
parent
0c84713e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
app/controllers/autocomplete_controller.rb
app/controllers/autocomplete_controller.rb
+1
-1
app/finders/autocomplete_users_finder.rb
app/finders/autocomplete_users_finder.rb
+1
-1
spec/finders/autocomplete_users_finder_spec.rb
spec/finders/autocomplete_users_finder_spec.rb
+1
-1
No files found.
app/controllers/autocomplete_controller.rb
View file @
20ff87a2
...
@@ -6,7 +6,7 @@ class AutocompleteController < ApplicationController
...
@@ -6,7 +6,7 @@ class AutocompleteController < ApplicationController
before_action
:find_users
,
only:
[
:users
]
before_action
:find_users
,
only:
[
:users
]
def
users
def
users
@users
=
YetAnother
UsersFinder
.
new
(
params:
params
,
current_user:
current_user
,
users:
@users
).
execute
@users
=
Autocomplete
UsersFinder
.
new
(
params:
params
,
current_user:
current_user
,
users:
@users
).
execute
render
json:
@users
,
only:
[
:name
,
:username
,
:id
],
methods:
[
:avatar_url
]
render
json:
@users
,
only:
[
:name
,
:username
,
:id
],
methods:
[
:avatar_url
]
end
end
...
...
app/finders/
yet_another
_users_finder.rb
→
app/finders/
autocomplete
_users_finder.rb
View file @
20ff87a2
class
YetAnother
UsersFinder
class
Autocomplete
UsersFinder
attr_reader
:current_user
,
:users
,
:search
,
:skip_users
,
:page
,
attr_reader
:current_user
,
:users
,
:search
,
:skip_users
,
:page
,
:per_page
,
:author_id
,
:params
:per_page
,
:author_id
,
:params
...
...
spec/finders/
yet_another
_users_finder_spec.rb
→
spec/finders/
autocomplete
_users_finder_spec.rb
View file @
20ff87a2
require
'spec_helper'
require
'spec_helper'
describe
YetAnother
UsersFinder
do
describe
Autocomplete
UsersFinder
do
describe
'#execute'
do
describe
'#execute'
do
let!
(
:user1
)
{
create
(
:user
,
username:
'johndoe'
)
}
let!
(
:user1
)
{
create
(
:user
,
username:
'johndoe'
)
}
let!
(
:user2
)
{
create
(
:user
,
:blocked
,
username:
'notsorandom'
)
}
let!
(
:user2
)
{
create
(
:user
,
:blocked
,
username:
'notsorandom'
)
}
...
...
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