Sha256: 93a08c8920aa2567aff663fc8b7abd1176dde84b0599320dde46158083ed1e1d

Contents?: true

Size: 739 Bytes

Versions: 14

Compression:

Stored size: 739 Bytes

Contents

# frozen_string_literal: true

module ForemanAcd
  module Concerns
    # Parameters for AppInstances
    module AppInstanceParameters
      extend ActiveSupport::Concern

      class_methods do
        def app_instance_params_filter
          Foreman::ParameterFilter.new(::ForemanAcd::AppInstance).tap do |filter|
            filter.permit(:name, :app_definition_id, :description, :hosts, :ansible_vars_all, :organization_id, :location_id)
          end
        end
      end

      def app_instance_params
        param_name = parameter_filter_context.api? ? 'app_instance' : 'foreman_acd_app_instance'
        self.class.app_instance_params_filter.filter_params(params, parameter_filter_context, param_name)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
foreman_acd-0.11.0 app/controllers/foreman_acd/concerns/app_instance_parameters.rb
foreman_acd-0.10.0 app/controllers/foreman_acd/concerns/app_instance_parameters.rb
foreman_acd-0.9.7 app/controllers/foreman_acd/concerns/app_instance_parameters.rb
foreman_acd-0.9.5 app/controllers/foreman_acd/concerns/app_instance_parameters.rb
foreman_acd-0.9.4 app/controllers/foreman_acd/concerns/app_instance_parameters.rb
foreman_acd-0.9.3 app/controllers/foreman_acd/concerns/app_instance_parameters.rb
foreman_acd-0.9.2.3 app/controllers/foreman_acd/concerns/app_instance_parameters.rb
foreman_acd-0.9.2.2 app/controllers/foreman_acd/concerns/app_instance_parameters.rb
foreman_acd-0.9.2.1 app/controllers/foreman_acd/concerns/app_instance_parameters.rb
foreman_acd-0.9.2 app/controllers/foreman_acd/concerns/app_instance_parameters.rb
foreman_acd-0.9.1 app/controllers/foreman_acd/concerns/app_instance_parameters.rb
foreman_acd-0.9.0 app/controllers/foreman_acd/concerns/app_instance_parameters.rb
foreman_acd-0.7.0 app/controllers/foreman_acd/concerns/app_instance_parameters.rb
foreman_acd-0.6.0 app/controllers/foreman_acd/concerns/app_instance_parameters.rb