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
a68c991c
Commit
a68c991c
authored
Nov 01, 2018
by
Jarka Košanová
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove instance autocomplete_service variable
parent
d0c58a97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
app/controllers/projects/autocomplete_sources_controller.rb
app/controllers/projects/autocomplete_sources_controller.rb
+8
-10
No files found.
app/controllers/projects/autocomplete_sources_controller.rb
View file @
a68c991c
# frozen_string_literal: true
class
Projects::AutocompleteSourcesController
<
Projects
::
ApplicationController
before_action
:load_autocomplete_service
,
except:
[
:members
]
def
members
render
json:
::
Projects
::
ParticipantsService
.
new
(
@project
,
current_user
).
execute
(
target
)
end
def
issues
render
json:
@
autocomplete_service
.
issues
render
json:
autocomplete_service
.
issues
end
def
merge_requests
render
json:
@
autocomplete_service
.
merge_requests
render
json:
autocomplete_service
.
merge_requests
end
def
labels
render
json:
@
autocomplete_service
.
labels_as_hash
(
target
)
render
json:
autocomplete_service
.
labels_as_hash
(
target
)
end
def
milestones
render
json:
@
autocomplete_service
.
milestones
render
json:
autocomplete_service
.
milestones
end
def
commands
render
json:
@
autocomplete_service
.
commands
(
target
,
params
[
:type
])
render
json:
autocomplete_service
.
commands
(
target
,
params
[
:type
])
end
def
snippets
render
json:
@
autocomplete_service
.
snippets
render
json:
autocomplete_service
.
snippets
end
private
def
load_
autocomplete_service
@autocomplete_service
=
::
Projects
::
AutocompleteService
.
new
(
@project
,
current_user
)
def
autocomplete_service
@autocomplete_service
||
=
::
Projects
::
AutocompleteService
.
new
(
@project
,
current_user
)
end
def
target
...
...
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