Module: ForemanDiscovery::Concerns::HostsControllerExtensions

Extended by:
ActiveSupport::Concern
Defined in:
app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb

Instance Method Summary collapse

Instance Method Details

#set_discovered_paramsObject

Change params to what the hosts controller expects. Certain methods in the hosts controller like all the _selected methods, taxonomy_scope, etc.. expect a params to work.



12
13
14
15
# File 'app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb', line 12

def set_discovered_params
  return if params[:discovered_host].nil?
  params[:host] ||= params.delete(:discovered_host)
end