Sha256: b709858b9cc3b68658f301a947da7799733e658bf047ae5e99645082e61d5951

Contents?: true

Size: 1.03 KB

Versions: 22

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

module ForemanWebhooks
  module Controller
    module Parameters
      module WebhookTemplate
        extend ActiveSupport::Concern
        include Foreman::Controller::Parameters::Taxonomix
        include Foreman::Controller::Parameters::Template

        class_methods do
          def webhook_template_params_filter
            Foreman::ParameterFilter.new(::WebhookTemplate).tap do |filter|
              add_taxonomix_params_filter(filter)
              add_template_params_filter(filter)
            end
          end
        end

        def webhook_template_params
          self.class.webhook_template_params_filter.filter_params(params, parameter_filter_context)
        end

        def organization_params
          self.class.organization_params_filter(::WebhookTemplate).filter_params(params, parameter_filter_context)
        end

        def location_params
          self.class.location_params_filter(::WebhookTemplate).filter_params(params, parameter_filter_context)
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
foreman_webhooks-4.0.0 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-3.2.3 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-3.2.2 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-3.1.1 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-3.2.1 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-3.2.0 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-3.1.0 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-3.0.5 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-2.0.3 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-3.0.4 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-2.0.2 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-3.0.3 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-3.0.2 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-3.0.1 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-2.0.1 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-3.0.0 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-2.0.0 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-1.1.0 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-1.0.0 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
foreman_webhooks-0.0.3 app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb