timescaledb
timescaledb copied to clipboard
Update README to extend Timescaledb::ActsAsHypertable in a lazy load hook
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
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 🚀