Sha256: 5341e4b3129dc79cee767ff207bf79d1e4092aa86c3cbef236cc6e6dbd1d4a7d

Contents?: true

Size: 557 Bytes

Versions: 57

Compression:

Stored size: 557 Bytes

Contents

module ForemanDiscovery
  module Concerns
    module HostsControllerExtensions
      extend ActiveSupport::Concern
      included do
        before_action :set_discovered_params
      end

      # 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[:host] to work.
      def set_discovered_params
        return if params[:discovered_host].nil?
        params[:host] ||= params.delete(:discovered_host)
      end
    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
foreman_discovery-25.1.0 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-25.0.1 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-25.0.0 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-24.0.2 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-23.0.2 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-24.0.1 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-24.0.0 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-23.0.1 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-23.0.0 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-22.0.4 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-21.0.5 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-22.0.2 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-21.0.4 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-21.0.3 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-21.0.2 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-19.0.5 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-19.0.4 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-21.0.1 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-19.0.3 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb
foreman_discovery-21.0.0 app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb