Sha256: fb49f2a2d7c8f711f26cceb95a3c1f14aefa140f45468e3edb6dc1e9d4f30613

Contents?: true

Size: 863 Bytes

Versions: 52

Compression:

Stored size: 863 Bytes

Contents

module ForemanTasks
  module Concerns
    module Parameters
      module Triggering
        extend ActiveSupport::Concern

        class_methods do
          def triggering_params_filter
            Foreman::ParameterFilter.new(::ForemanTasks::Triggering).tap do |filter|
              filter.permit_by_context(
                [
                  :mode,
                  :start_at,
                  :start_before,
                  *::ForemanTasks::Triggering::PARAMS,
                  :days_of_week => {},
                  :time => {},
                  :end_time => {}
                ],
                :nested => true
              )
            end
          end
        end

        def triggering_params
          self.class.triggering_params_filter.filter_params(params, parameter_filter_context, :triggering)
        end
      end
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
foreman-tasks-0.11.3 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.14.0 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.13.4 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.13.3 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.13.2 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.13.1 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.13.0 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.12.2 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.11.2 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.12.1 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.12.0 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.11.1 app/controllers/foreman_tasks/concerns/parameters/triggering.rb