lib/good_job.rb in good_job-1.9.0 vs lib/good_job.rb in good_job-1.9.1
- old
+ new
@@ -15,9 +15,18 @@
# GoodJob is a multithreaded, Postgres-based, ActiveJob backend for Ruby on Rails.
#
# +GoodJob+ is the top-level namespace and exposes configuration attributes.
module GoodJob
+ # @!attribute [rw] active_record_parent_class
+ # @!scope class
+ # The ActiveRecord parent class inherited by +GoodJob::Job+ (default: +ActiveRecord::Base+).
+ # Use this when using multiple databases or other custom ActiveRecord configuration.
+ # @return [ActiveRecord::Base]
+ # @example Change the base class:
+ # GoodJob.active_record_parent_class = "CustomApplicationRecord"
+ mattr_accessor :active_record_parent_class, default: "ActiveRecord::Base"
+
# @!attribute [rw] logger
# @!scope class
# The logger used by GoodJob (default: +Rails.logger+).
# Use this to redirect logs to a special location or file.
# @return [Logger]