diff --git a/CHANGELOG.md b/CHANGELOG.md index 17397ff..de662c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # 4.0.0 / 2024-08-21 -- Remove support for Ruby =< 3.0 and Rails =< 6.0 +- Remove support for Ruby =< 3.0 and Rails < 7.0 +- Add support for ActiveRecord 7.2 (#98) # 3.0.0 / 2020-09-28 diff --git a/lib/active_record/safer_migrations/postgresql_adapter.rb b/lib/active_record/safer_migrations/postgresql_adapter.rb index f03f3f8..76394fd 100644 --- a/lib/active_record/safer_migrations/postgresql_adapter.rb +++ b/lib/active_record/safer_migrations/postgresql_adapter.rb @@ -33,7 +33,7 @@ def get_setting(setting_name) end def fill_sql_values(sql, values) - if Rails.version >= '7.2.0' + if ActiveRecord.version >= "7.2.0" ActiveRecord::Base.send(:replace_named_bind_variables, self, sql, values) else ActiveRecord::Base.send(:replace_named_bind_variables, sql, values)