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.8.3 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.8.2 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.8.1 app/controllers/foreman_tasks/concerns/parameters/triggering.rb
foreman-tasks-0.8.0 app/controllers/foreman_tasks/concerns/parameters/triggering.rb