Sha256: 1d8c586c0c3c80ae8050c1e55c6175a10bf9bee829d3a30fb89e621275350fb5

Contents?: true

Size: 551 Bytes

Versions: 13

Compression:

Stored size: 551 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.all.includes(:jobs)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
good_job-3.18.2 app/filters/good_job/batches_filter.rb
good_job-3.18.1 app/filters/good_job/batches_filter.rb
good_job-3.18.0 app/filters/good_job/batches_filter.rb
good_job-3.17.4 app/filters/good_job/batches_filter.rb
good_job-3.17.3 app/filters/good_job/batches_filter.rb
good_job-3.17.2 app/filters/good_job/batches_filter.rb
good_job-3.17.1 app/filters/good_job/batches_filter.rb
good_job-3.17.0 app/filters/good_job/batches_filter.rb
good_job-3.16.4 app/filters/good_job/batches_filter.rb
good_job-3.16.3 app/filters/good_job/batches_filter.rb
good_job-3.16.2 app/filters/good_job/batches_filter.rb
good_job-3.16.1 app/filters/good_job/batches_filter.rb
good_job-3.16.0 app/filters/good_job/batches_filter.rb