timescaledb icon indicating copy to clipboard operation
timescaledb copied to clipboard

Update README to extend Timescaledb::ActsAsHypertable in a lazy load hook

Open ryoung opened this issue 1 year ago • 1 comments

Directly extending forcibly loads ActiveRecord::Base in the initializer. Instead we should be using hooks to defer loading until it’s actually needed.

For reference - https://api.rubyonrails.org/classes/ActiveSupport/LazyLoadHooks.html

ryoung avatar Sep 24 '24 15:09 ryoung

Thanks for bringing this @ryoung! I never used it, I'll consider also migrating all docs and hooks to use it too. I have some work in progress to let the user introduce the extend hooks as they want.

Thanks for the contribution 🚀

jonatas avatar Sep 26 '24 08:09 jonatas