Sha256: 576f8aaabc58263c7b1774a100b7d140b7ee6f56ee1815ab6d8be93c2dfebfce

Contents?: true

Size: 483 Bytes

Versions: 11

Compression:

Stored size: 483 Bytes

Contents

module ForemanStatistics
  module Parameters::Trend
    extend ActiveSupport::Concern

    class_methods do
      def trend_params_filter
        Foreman::ParameterFilter.new(Trend).tap do |filter|
          filter.permit :fact_value, :fact_name,
            :name,
            :trendable_type, :trendable_id,
            :type
        end
      end
    end

    def trend_params
      self.class.trend_params_filter.filter_params(params, parameter_filter_context)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
foreman_statistics-2.1.0 app/controllers/concerns/foreman_statistics/parameters/trend.rb
foreman_statistics-2.0.1 app/controllers/concerns/foreman_statistics/parameters/trend.rb
foreman_statistics-2.0.0 app/controllers/concerns/foreman_statistics/parameters/trend.rb
foreman_statistics-1.2.0 app/controllers/concerns/foreman_statistics/parameters/trend.rb
foreman_statistics-1.1.1 app/controllers/concerns/foreman_statistics/parameters/trend.rb
foreman_statistics-1.1.0 app/controllers/concerns/foreman_statistics/parameters/trend.rb
foreman_statistics-1.0.0 app/controllers/concerns/foreman_statistics/parameters/trend.rb
foreman_statistics-0.1.3 app/controllers/concerns/foreman_statistics/parameters/trend.rb
foreman_statistics-0.1.2 app/controllers/concerns/foreman_statistics/parameters/trend.rb
foreman_statistics-0.1.1 app/controllers/concerns/foreman_statistics/parameters/trend.rb
foreman_statistics-0.1.0 app/controllers/concerns/foreman_statistics/parameters/trend.rb