Class: Katello::ErrataController

Inherits:
ApplicationController show all
Defined in:
app/controllers/katello/errata_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#authorized, #current_organization_object, #current_organization_object=, #section_id

Instance Method Details

#auto_completeObject



3
4
5
6
7
8
9
10
# File 'app/controllers/katello/errata_controller.rb', line 3

def auto_complete
  repo_ids = readable_repos(:pulp_id)

  results = Errata.autocomplete_search("#{params[:term]}*", repo_ids)
  results = results.map { |erratum| {label: erratum.id_title, value: erratum.errata_id} }

  render :json => results
end