mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-10 21:26:07 +10:00
Faster autocomplete for users/issues/emojiis
Instead of loading all issues and merge requests we load only open one. This will reduce time load for autocomplete resources significantly
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
module Projects
|
||||
class AutocompleteService < BaseService
|
||||
def initialize(project)
|
||||
@project = project
|
||||
end
|
||||
|
||||
def issues
|
||||
@project.issues.opened.select([:iid, :title, :description])
|
||||
end
|
||||
|
||||
def merge_requests
|
||||
@project.merge_requests.opened.select([:iid, :title, :description])
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user