Sha256: f4674aa27edcf91ef1a4782483e11b8adfcc2d5a202a5704f0dcf85a19472586

Contents?: true

Size: 550 Bytes

Versions: 32

Compression:

Stored size: 550 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

32 entries across 32 versions & 1 rubygems

Version Path
good_job-3.12.7 app/filters/good_job/batches_filter.rb
good_job-3.12.6 app/filters/good_job/batches_filter.rb
good_job-3.12.5 app/filters/good_job/batches_filter.rb
good_job-3.12.4 app/filters/good_job/batches_filter.rb
good_job-3.12.3 app/filters/good_job/batches_filter.rb
good_job-3.12.2 app/filters/good_job/batches_filter.rb
good_job-3.12.1 app/filters/good_job/batches_filter.rb
good_job-3.12.0 app/filters/good_job/batches_filter.rb
good_job-3.11.1 app/filters/good_job/batches_filter.rb
good_job-3.11.0 app/filters/good_job/batches_filter.rb
good_job-3.10.1 app/filters/good_job/batches_filter.rb
good_job-3.10.0 app/filters/good_job/batches_filter.rb