Sha256: 9fca9d82cfe9220e09a5d99241db155f2434916905f111b2a38f9ac6f28ff40c

Contents?: true

Size: 547 Bytes

Versions: 52

Compression:

Stored size: 547 Bytes

Contents

# frozen_string_literal: true

module GoodJob
  class BatchesFilter < BaseFilter
    def records
      after_created_at = params[:after_created_at].present? ? Time.zone.parse(params[:after_created_at]) : nil

      filtered_query.display_all(
        after_created_at: after_created_at,
        after_id: params[:after_id]
      ).limit(params.fetch(:limit, DEFAULT_LIMIT))
    end

    def filtered_query(_filtered_params = params)
      base_query
    end

    def default_base_query
      GoodJob::BatchRecord.includes(:jobs)
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
good_job-3.30.0 app/filters/good_job/batches_filter.rb
good_job-3.29.5 app/filters/good_job/batches_filter.rb
good_job-3.29.4 app/filters/good_job/batches_filter.rb
good_job-3.29.3 app/filters/good_job/batches_filter.rb
good_job-3.28.2 app/filters/good_job/batches_filter.rb
good_job-3.28.1 app/filters/good_job/batches_filter.rb
good_job-3.28.0 app/filters/good_job/batches_filter.rb
good_job-3.27.4 app/filters/good_job/batches_filter.rb
good_job-3.27.3 app/filters/good_job/batches_filter.rb
good_job-3.27.2 app/filters/good_job/batches_filter.rb
good_job-3.27.1 app/filters/good_job/batches_filter.rb
good_job-3.27.0 app/filters/good_job/batches_filter.rb
good_job-3.26.2 app/filters/good_job/batches_filter.rb
good_job-3.26.1 app/filters/good_job/batches_filter.rb
good_job-3.26.0 app/filters/good_job/batches_filter.rb
good_job-3.25.0 app/filters/good_job/batches_filter.rb
good_job-3.24.0 app/filters/good_job/batches_filter.rb
good_job-3.23.0 app/filters/good_job/batches_filter.rb
good_job-3.22.0 app/filters/good_job/batches_filter.rb
good_job-3.21.5 app/filters/good_job/batches_filter.rb