From 17970b0ea8a9bdd1da9e78a5b8e920708db196c9 Mon Sep 17 00:00:00 2001 From: Richard Young Date: Thu, 28 Nov 2024 13:16:12 -0600 Subject: [PATCH] Update README to extend Timescaledb::ActsAsHypertable in a lazy load hook (#75) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 22b8dc0..8a38e37 100644 --- a/README.md +++ b/README.md @@ -322,7 +322,7 @@ which will correctly handle schema dumping. Create your `config/initializers/timescaledb.rb` file and add the following line: ```ruby -ActiveRecord::Base.extend Timescaledb::ActsAsHypertable +ActiveSupport.on_load(:active_record) { extend Timescaledb::ActsAsHypertable } ``` You can declare a Rails model as a Hypertable by invoking the `acts_as_hypertable` macro. This macro extends your existing model with timescaledb-related functionality.