Sha256: c1e22a5865b1b17f2146a3ca1e7ab5544ad829d79af28aaeb645ff0102bbf555

Contents?: true

Size: 778 Bytes

Versions: 14

Compression:

Stored size: 778 Bytes

Contents

# frozen_string_literal: true

module ForemanAcd
  module Concerns
    # Parameters for AppDefinitions
    module AppDefinitionParameters
      extend ActiveSupport::Concern

      class_methods do
        def app_definition_params_filter
          Foreman::ParameterFilter.new(::ForemanAcd::AppDefinition).tap do |filter|
            filter.permit(:name, :description, :acd_ansible_playbook_id, :services, :ansible_vars_all, :location_ids => [], :organization_ids => [])
          end
        end
      end

      def app_definition_params
        param_name = parameter_filter_context.api? ? 'app_definition' : 'foreman_acd_app_definition'
        self.class.app_definition_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_definition_parameters.rb
foreman_acd-0.10.0 app/controllers/foreman_acd/concerns/app_definition_parameters.rb
foreman_acd-0.9.7 app/controllers/foreman_acd/concerns/app_definition_parameters.rb
foreman_acd-0.9.5 app/controllers/foreman_acd/concerns/app_definition_parameters.rb
foreman_acd-0.9.4 app/controllers/foreman_acd/concerns/app_definition_parameters.rb
foreman_acd-0.9.3 app/controllers/foreman_acd/concerns/app_definition_parameters.rb
foreman_acd-0.9.2.3 app/controllers/foreman_acd/concerns/app_definition_parameters.rb
foreman_acd-0.9.2.2 app/controllers/foreman_acd/concerns/app_definition_parameters.rb
foreman_acd-0.9.2.1 app/controllers/foreman_acd/concerns/app_definition_parameters.rb
foreman_acd-0.9.2 app/controllers/foreman_acd/concerns/app_definition_parameters.rb
foreman_acd-0.9.1 app/controllers/foreman_acd/concerns/app_definition_parameters.rb
foreman_acd-0.9.0 app/controllers/foreman_acd/concerns/app_definition_parameters.rb
foreman_acd-0.7.0 app/controllers/foreman_acd/concerns/app_definition_parameters.rb
foreman_acd-0.6.0 app/controllers/foreman_acd/concerns/app_definition_parameters.rb