diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 4ec0abb03..853fe8cb9 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -52,7 +52,9 @@ class RepositoriesController < ApplicationController end def rows_list - render json: { data: @repository.repository_rows.map { |r| [r.id, r.name] } } + results = @repository.repository_rows + results = results.name_like(params[:query]) if params[:query].present? + render json: { data: results.map { |r| [r.id, r.name] } } end def sidebar