Sha256: e63360d958235d1d56a13ec942618753d5d973996515ff437ca77f7d0e5c149a

Contents?: true

Size: 407 Bytes

Versions: 7

Compression:

Stored size: 407 Bytes

Contents

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
      end
    end
  end

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
foreman_snapshot_management-1.6.0 app/controllers/concerns/foreman/controller/parameters/snapshot.rb
foreman_snapshot_management-1.5.1 app/controllers/concerns/foreman/controller/parameters/snapshot.rb
foreman_snapshot_management-1.5.0 app/controllers/concerns/foreman/controller/parameters/snapshot.rb
foreman_snapshot_management-1.4.0 app/controllers/concerns/foreman/controller/parameters/snapshot.rb
foreman_snapshot_management-1.3.0 app/controllers/concerns/foreman/controller/parameters/snapshot.rb
foreman_snapshot_management-1.2.0 app/controllers/concerns/foreman/controller/parameters/snapshot.rb
foreman_snapshot_management-1.1.0 app/controllers/concerns/foreman/controller/parameters/snapshot.rb