Sha256: e21835e2a78ec54a594fe6c4779362a7729f623a17dcb2a24b7df9e9bfd702f8

Contents?: true

Size: 410 Bytes

Versions: 12

Compression:

Stored size: 410 Bytes

Contents

module MissionControl::Jobs::JobFilters
  extend ActiveSupport::Concern

  included do
    before_action :set_filters

    helper_method :active_filters?
  end

  private
    def set_filters
      @job_filters = { job_class_name: params.dig(:filter, :job_class_name).presence, queue_name: params.dig(:filter, :queue_name).presence }.compact
    end

    def active_filters?
      @job_filters.any?
    end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mission_control-jobs-0.6.0 app/controllers/concerns/mission_control/jobs/job_filters.rb
mission_control-jobs-0.5.0 app/controllers/concerns/mission_control/jobs/job_filters.rb
mission_control-jobs-0.4.0 app/controllers/concerns/mission_control/jobs/job_filters.rb
mission_control-jobs-0.3.3 app/controllers/concerns/mission_control/jobs/job_filters.rb
mission_control-jobs-0.3.2 app/controllers/concerns/mission_control/jobs/job_filters.rb
mission_control-jobs-0.3.1 app/controllers/concerns/mission_control/jobs/job_filters.rb
mission_control-jobs-0.3.0 app/controllers/concerns/mission_control/jobs/job_filters.rb
mission_control-jobs-0.2.2 app/controllers/concerns/mission_control/jobs/job_filters.rb
mission_control-jobs-0.2.1 app/controllers/concerns/mission_control/jobs/job_filters.rb
mission_control-jobs-0.2.0 app/controllers/concerns/mission_control/jobs/job_filters.rb
mission_control-jobs-0.1.1 app/controllers/concerns/mission_control/jobs/job_filters.rb
mission_control-jobs-0.1.0 app/controllers/concerns/mission_control/jobs/job_filters.rb