Delay execution of ActiveRecord::Base-related processing
ActiveRecord::Bitemporal uses ActiveSupport.on_load(:active_record) do ... end to defer processing related to ActiveRecord::Base.
ref: source
However, there were multiple references to ActiveRecord::Base outside the ActiveSupport.on_load block, causing the deferred processing to not work as expected. To properly delay execution, the necessary files were extracted, and dependencies on ActiveRecord::Base are now required within the ActiveSupport.on_load block.
Thank you for working this PR.
Currently, our team is working on features that rely heavily on the internals of the bitemporal gem, and we would like to postpone merging this change until those features are released.
@willnet Sorry for the very late response. With the release of 6.0.0, the feature development we were dealing with internally has been resolved and we are ready to merge this PR. Could you please rebase it and resolve the conflicts?
Rebased the branch and resolved conflicts 😃