Class: Katello::AutoCompleteSearchController

Inherits:
ApplicationController show all
Includes:
Foreman::Controller::AutoCompleteSearch
Defined in:
app/controllers/katello/auto_complete_search_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

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

Instance Method Details

#modelObject



9
10
11
# File 'app/controllers/katello/auto_complete_search_controller.rb', line 9

def model
  Katello::Util::Model.controller_path_to_model("katello/#{params[:kt_path]}")
end

#model_of_controllerObject



5
6
7
# File 'app/controllers/katello/auto_complete_search_controller.rb', line 5

def model_of_controller
  Organization.current ? model.where(:organization_id => Organization.current.id) : model
end

#permission_controllerObject



13
14
15
# File 'app/controllers/katello/auto_complete_search_controller.rb', line 13

def permission_controller
  "katello/#{params[:kt_path]}"
end