From c2a4f86f35974f5993be1711d930379442b9ad23 Mon Sep 17 00:00:00 2001 From: nixx Date: Wed, 22 Jun 2022 20:09:20 +0300 Subject: [PATCH] published 0.5.10 - revert changed arel_table --- CHANGELOG.md | 6 ++++-- .../connection_adapters/clickhouse_adapter.rb | 13 +++---------- lib/clickhouse-activerecord/version.rb | 2 +- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53876aa8..3dbfb857 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ -### Version 0.5.8 (Oct 25, 2021) +### Version 0.5.10 (Jun 22, 2022) - * Added support rails 7 + * Fixes to create_table method (#70) + * Added support for rails 7 (#65) + * Use ClickHouse default KeepAlive timeout of 10 seconds (#67) ### Version 0.5.6 (Oct 25, 2021) diff --git a/lib/active_record/connection_adapters/clickhouse_adapter.rb b/lib/active_record/connection_adapters/clickhouse_adapter.rb index 9ed13145..28a38a3a 100644 --- a/lib/active_record/connection_adapters/clickhouse_adapter.rb +++ b/lib/active_record/connection_adapters/clickhouse_adapter.rb @@ -81,17 +81,10 @@ def is_view def is_view=(value) @is_view = value end - end - end - ActiveRecord::Core::ClassMethods.module_eval do - def arel_table - @arel_table ||= - if self.connection.is_a?(ConnectionAdapters::ClickhouseAdapter) - ClickhouseActiverecord::Arel::Table.new(table_name, type_caster: type_caster) - else - Arel::Table.new(table_name, klass: self) - end + def arel_table # :nodoc: + @arel_table ||= ClickhouseActiverecord::Arel::Table.new(table_name, type_caster: type_caster) + end end end diff --git a/lib/clickhouse-activerecord/version.rb b/lib/clickhouse-activerecord/version.rb index 7641e8ae..870f01bf 100644 --- a/lib/clickhouse-activerecord/version.rb +++ b/lib/clickhouse-activerecord/version.rb @@ -1,3 +1,3 @@ module ClickhouseActiverecord - VERSION = '0.5.9' + VERSION = '0.5.10' end