Sha256: 8bb15e1602323c42957011d6fea54f45bdc2b80e9eeaebb79ea4f09674180242

Contents?: true

Size: 472 Bytes

Versions: 4

Compression:

Stored size: 472 Bytes

Contents

# frozen_string_literal: true

module Foreman::Controller::Parameters::Snapshot
  extend ActiveSupport::Concern

  class_methods do
    def snapshot_params_filter
      Foreman::ParameterFilter.new(::ForemanSnapshotManagement::Snapshot).tap do |filter|
        filter.permit :name, :description, :include_ram, :quiesce, :host_id
      end
    end
  end

  def snapshot_params
    self.class.snapshot_params_filter.filter_params(params, parameter_filter_context)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_snapshot_management-4.0.0 app/controllers/concerns/foreman/controller/parameters/snapshot.rb
foreman_snapshot_management-3.0.1 app/controllers/concerns/foreman/controller/parameters/snapshot.rb
foreman_snapshot_management-3.0.0 app/controllers/concerns/foreman/controller/parameters/snapshot.rb
foreman_snapshot_management-2.0.3 app/controllers/concerns/foreman/controller/parameters/snapshot.rb