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.15.14 app/filters/good_job/batches_filter.rb
good_job-3.15.13 app/filters/good_job/batches_filter.rb
good_job-3.15.12 app/filters/good_job/batches_filter.rb
good_job-3.15.11 app/filters/good_job/batches_filter.rb
good_job-3.15.10 app/filters/good_job/batches_filter.rb
good_job-3.15.9 app/filters/good_job/batches_filter.rb
good_job-3.15.8 app/filters/good_job/batches_filter.rb
good_job-3.15.7 app/filters/good_job/batches_filter.rb
good_job-3.15.6 app/filters/good_job/batches_filter.rb
good_job-3.15.5 app/filters/good_job/batches_filter.rb
good_job-3.15.4 app/filters/good_job/batches_filter.rb
good_job-3.15.3 app/filters/good_job/batches_filter.rb
good_job-3.15.2 app/filters/good_job/batches_filter.rb
good_job-3.15.1 app/filters/good_job/batches_filter.rb
good_job-3.15.0 app/filters/good_job/batches_filter.rb
good_job-3.14.2 app/filters/good_job/batches_filter.rb
good_job-3.14.1 app/filters/good_job/batches_filter.rb
good_job-3.14.0 app/filters/good_job/batches_filter.rb
good_job-3.13.0 app/filters/good_job/batches_filter.rb
good_job-3.12.8 app/filters/good_job/batches_filter.rb