Sha256: e295e920c49c857a576c99f82be215a049df8687ec26a784776202428fc0a161

Contents?: true

Size: 849 Bytes

Versions: 24

Compression:

Stored size: 849 Bytes

Contents

module ForemanTasks
  module Concerns
    module Parameters
      module Triggering
        extend ActiveSupport::Concern
        include Foreman::Controller::Parameters::KeepParam

        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,
                                       :nested => true)
            end
          end
        end

        def triggering_params
          keep_param(params, :triggering, :days_of_week, :time, :end_time) do
            self.class.triggering_params_filter.filter_params(params, parameter_filter_context, :triggering)
          end
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
foreman-tasks-0.10.9 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.11.0 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.10.8 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.10.7 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.10.6 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.10.4 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.9.6 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.10.3 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.10.2 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.10.1 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.9.5 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.10.0 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.9.4 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.9.3 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.9.2 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.9.1 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.9.0 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.8.6 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.8.5 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.8.4 app/controllers/foreman_tasks/concerns/parameters/triggering.rb